Results for “Rebuild UI when state changes”
Full-text search across Boring Doc explanations, official documentation pages, the Flutter API index and every indexed version change.
Concepts
- State management3.47.7state
UI is a function of state, so instead of mutating widgets you change the data and let the affected widgets rebuild. Keep state
- Widgets and the widget lifecycle3.47.7widgets
only on its constructor arguments and BuildContext. StatefulWidget creates a State object that survives rebuilds and holds mutable data. State lifecycle: initState → didChangeDependencies → build → (didUpdateWidget
- Performance3.47.7performance
long drops the frame. setState marks that State's element dirty and everything below it rebuilds unless a child is the identical widget instance. Keep setState
- Networking and JSON3.47.7data
Use package:http to send a request, await the Future , check the
- Testing3.47.7testing
Flutter has three test levels: unit tests (package:test) for plain Dart