title: How to setState inside showModalBottomSheet
body: <p>Is there any limitation in BottomSheet that we cannot update the widget states? As you can see in the example below I'm using a Switch but its display is not changing, although the value update, it's just that it doesn't get re-render again.</p>
  
  <p>This is part of StatefulWidget right now.</p>
  
  <p>This same problem I'm experiencing with the DropdownButton widget. These both work in normal page fine.</p>
  
  <p>Does anybody have the idea?</p>
  
  <pre><code>showModalBottomSheet(
    context: context,
    builder: (BuildContext context) {
      return BottomSheet(
        onClosing: () {},
        builder: (BuildContext context) {
          return Switch(
            onChanged: (bool v) {
              debugPrint('v is ${v.toString()}');
              // b = v; &lt;&lt;-- This is also not working when using StatelessWidget
              setState(() =&gt; b = v);
              debugPrint(b.toString());
            },
            value: b,
          );
        },
      );
    },
  );
  </code></pre>