You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
setState might not update the widgets in showDrawer #604
Sorry if this is sparse on details. I mainly want to determine if there is a bug with showDrawer or with the way I attempted to use it.
Yesterday, I attempted to use showDrawer with the 7be58b1 alpha branch of Flutter. The drawer appeared/dismissed correctly, and the widgets I put in the drawer were correct.
Unfortunately, I noticed that no matter how I attempted to change the state of what was drawn in the drawer, it would not re-render. In my case, I tried to put a Switch inside a DrawerItem to toggle debug mode for my app. I did confirm that the state did actually change, which led me to think that Flutter has a bug.
I was following the Stocks demo app quite closely, which uses a Drawer to toggle the user's market sentiment (Optimistic vs Pessimistic). However, I was assuming that the app's behavior would match the Sky Demo app in the Google Play Store. I only just realized that this app is actually 3 months old (last update August 25), so it is very possible that in that time, the Stocks example does not function as it did before.
I am currently unable to try running these examples (though I have found the instructions), so if someone else can run the Stocks app and determine whether the Optimistic/Pessimistic radio buttons update the drawer menu or not, that would be very helpful.
Otherwise, I will look into this more after the break.
This is a duplicate of #187. I can fix it for you.
Sky Demo app in the Google Play Store
Yeah, that demo is really old. We've unpublished it because we're no longer maintaining it.
someone else can run the Stocks app
The stocks app has the same bug. The issue is with how the showDrawer function takes its arguments. It needs to take a WidgetBuilder instead of a widget.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
abarth commentedon Nov 27, 2015
This is a duplicate of #187. I can fix it for you.
Yeah, that demo is really old. We've unpublished it because we're no longer maintaining it.
The stocks app has the same bug. The issue is with how the
showDrawerfunction takes its arguments. It needs to take aWidgetBuilderinstead of awidget.abarth commentedon Nov 27, 2015
Hum... The fix isn't as simple as I thought it would be.
abarth commentedon Nov 27, 2015
Fix in #605
Make Drawer stateful again
Fix a large number of Drawer bugs
github-actions commentedon Sep 7, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.