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.