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
I am not completely sure that this is a bug (but it seems to me that it is).
I am using v2.7.1 of the library (2.8.x throws some error not working at all, I will look that up and might open an issue for that as well) to create a settings page within my flutter app. In particular, in the minimum code sample below, I am using the PrefPage widget (which so far seems to be the only widget with this specific problem).
Now, when I change the choice in my dropdown item within that widget, the page is not refreshed even though I call an additional setState() on an extra variable currentChoice and the build method gets called. If I go back to the main screen and then back to the PrefPage however, it is updated.
I think it would be best if the widget was updated without using any additional setState() logic on variables apart from the corresponding pref variable, as the currentChoice variable is redundant as it is already stored in the pref preferences.
Interestingly, if I change the PrefDropdown part to a normal DropdownButton by using the following code, it gets even worse as the chosen item is not even shown in the dropdown button (if I choose Item 2 instead of Item 1, the screen still shows Item 1).
Hi again,
I am quite sorry, when I was looking through the other posts, I realized that this might be strongly related to #30, so it might have been better to post it there...
Cheers
First off, thank you for the good work!
I am not completely sure that this is a bug (but it seems to me that it is).
I am using v2.7.1 of the library (2.8.x throws some error not working at all, I will look that up and might open an issue for that as well) to create a settings page within my flutter app. In particular, in the minimum code sample below, I am using the PrefPage widget (which so far seems to be the only widget with this specific problem).
Here is the state part of my minimal app:
Now, when I change the choice in my dropdown item within that widget, the page is not refreshed even though I call an additional setState() on an extra variable currentChoice and the build method gets called. If I go back to the main screen and then back to the PrefPage however, it is updated.
I think it would be best if the widget was updated without using any additional setState() logic on variables apart from the corresponding pref variable, as the currentChoice variable is redundant as it is already stored in the pref preferences.
Interestingly, if I change the PrefDropdown part to a normal DropdownButton by using the following code, it gets even worse as the chosen item is not even shown in the dropdown button (if I choose Item 2 instead of Item 1, the screen still shows Item 1).
I can post the full code of the minimal app if that helps.
Thanks!
The text was updated successfully, but these errors were encountered: