NEW
Font size
WorksheetsIC4 Quizizz: State Management
Total questions: 10
Worksheet time: 3mins
In Flutter’s StatefulWidget, what exactly does calling setState() do?
Permanently removes the widget from the tree
Marks the widget as “dirty” so Flutter will rebuild it
Sends an asynchronous event to the Bloc
Converts a StatelessWidget into a StatefulWidget
Why can sprinkling setState() all over a complex widget hurt maintainability?
It causes unintended network requests
It scatters logic, makes tracing state hard, and can trigger excessive rebuilds
It prevents unit testing altogether
It forces you to use more animations
What’s the main drawback of keeping business logic inside a single StatefulWidget?
UI and logic become tightly coupled, reducing readability and testability
It automatically rebuilds only parts of the widget tree
It eliminates the need for any state management library
It speeds up widget rendering too much
Which of these was not listed as a Flutter state-management solution in the slides?
Redux
MobX
Riverpod
Provider
What key simplification does Cubit introduce over Bloc?
It removes the event class and state changes are emitted directly
It eliminates the need for a build() method
It uses setState() under the hood
It stores state in a global singleton by default
Which Bloc wrapper is used to inject a Cubit/Bloc instance into the widget tree?
BlocBuilder
BlocListener
BlocProvider
BlocConsumer
Which BloC wrapper should you use when you want to rebuild a widget in response to more than one state?
BlocSelector
BlocListener
BlocConsumer
BlocBuilder
If you need to perform side effects (e.g., show a dialog) when the state changes, which wrapper is appropriate?
BlocBuilder
BlocSelector
BlocListener
BlocProvider
You want both UI rebuilding and side-effects in one place—what do you choose?
BlocSelector
BlocProvider
BlocListener
BlocConsumer
To listen to only a specific slice of the state and avoid unnecessary rebuilds, which wrapper do you pick?
BlocSelector
BlocListener
BlocConsumer
BlocBuilder
