Step 1 / 5
UI = f(state)
Flutter is declarative: you describe the UI for the current state, and when the state changes you describe it again. There's no setText(). You change data and rebuild.
Tell local UI state from shared app state, and lift state up to the widget that needs it.
count: ?build ×1setStatebuild ×1setStatebuild ×1setStatebuild ×1count: ?build ×1Each tile keeps its own setState. The Header badge never hears about it.
Flutter is declarative: you describe the UI for the current state, and when the state changes you describe it again. There's no setText(). You change data and rebuild.