79241806

Date: 2024-12-01 14:47:23
Score: 1
Natty:
Report link

Problem The state update (setState) affects the parent widget (_ImpostazioniLaunchComponentCopyState), but since CommandsPage and its children are recreated every time, the state change doesn't persist across navigation.

Solution To preserve the state across navigation, you can:

Pass the updated state (test) explicitly to the CommandsPage. Use a state management solution like Provider, GetX, or InheritedWidget. Refactor your CommandsPage to maintain its own state or receive the initial value from the parent widget.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: houssam eddine aziez