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
Describe the bug
If you use the ProfileScreen in a StatefulWidget, after calling SetState, the "children" of the widget ProfileScreen won't be rebuilt.
Steps to reproduce
Create an empty StatefulWidget.
In the build method add the ProfileScreen
Add a Text widget as the children (displaying the text of a variable in the state).
Additionally, as another child, add an ElevatedButton widget that calls the setState method and alters the String variable that the Text widget is displaying.
Test the app, you will see how that child won't be rebuilt. If you add more widgets (outside the ProfileScreen) you will see how those are rebuilt (even the ProfileScreen itself gets rebuilt).
Expected behavior
The children of the ProfileScreen should be rebuilt to display/work accordingly to the updated data.
Additional context
I have checked the code of ProfileScreen, and it looks to me that the issue occurs due to the constant list it is given by default in the children parameter:
Additionally, I do believe that the ProfileScreen widget might need some rework as mentioned here and in #9229.
Flutter doctor
Run flutter doctor and paste the output below:
Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.3, on Microsoft Windows [Version 10.0.22621.521], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.19)
[√] Android Studio (version 2021.3)
[√] Connected device (3 available)
[√] HTTP Host Availability
• No issues found!
Flutter dependencies
Run flutter pub deps -- --style=compact and paste the output below:
Thanks for the report. There's a similar issue open when the profile screen doesn't rebuild after coming back from email verification : #8683 and there seems to be work going on to fix these that you can track for reference:
Bug report
Describe the bug
If you use the ProfileScreen in a StatefulWidget, after calling SetState, the "children" of the widget ProfileScreen won't be rebuilt.
Steps to reproduce
Expected behavior
The children of the ProfileScreen should be rebuilt to display/work accordingly to the updated data.
Additional context
I have checked the code of ProfileScreen, and it looks to me that the issue occurs due to the constant list it is given by default in the children parameter:

Additionally, I do believe that the ProfileScreen widget might need some rework as mentioned here and in #9229.
Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
The text was updated successfully, but these errors were encountered: