<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>justy03</author_name>
  <author_url>https://blog.hatena.ne.jp/justy03/</author_url>
  <blog_title>ふくしま</blog_title>
  <blog_url>https://justylifememo.hatenablog.com/</blog_url>
  <categories>
    <anon>Flutter</anon>
  </categories>
  <description>やりたかったこと setState しても二度目の非同期処理が走らない状態にしたかった。 起こった問題 以前書いたFutureBuilder で future に入れた値はどこに行くのか分からなくて四苦八苦した話。でやったように、 future に直接、非同期処理の関数を入れていたら、setState するたびに非同期処理が走ってしまった。 例えば、チェックボックス Widget で onChanged するときに setState でチェックを入れたかのフラグを切り替えたりするけど、 チェックボックスにチェックを入れるたびに、くるくる画面になってしまうイメージ。これは良くない。 解決策 in…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjustylifememo.hatenablog.com%2Fentry%2F2022%2F07%2F19%2F235542&quot; title=&quot;FutureBuilder の future に非同期処理の関数を直接入れていたら、setState するたびに非同期処理が走った話。 - ふくしま&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-07-19 23:55:42</published>
  <title>FutureBuilder の future に非同期処理の関数を直接入れていたら、setState するたびに非同期処理が走った話。</title>
  <type>rich</type>
  <url>https://justylifememo.hatenablog.com/entry/2022/07/19/235542</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
