wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

IC4 Quizizz: State Management

Total questions: 10

Worksheet time: 3mins

Name
Class
Date
1.

In Flutter’s StatefulWidget, what exactly does calling setState() do?

a)

Permanently removes the widget from the tree

b)

Marks the widget as “dirty” so Flutter will rebuild it

c)

Sends an asynchronous event to the Bloc

d)

Converts a StatelessWidget into a StatefulWidget

2.

Why can sprinkling setState() all over a complex widget hurt maintainability?

a)

It causes unintended network requests

b)

It scatters logic, makes tracing state hard, and can trigger excessive rebuilds

c)

It prevents unit testing altogether

d)

It forces you to use more animations

3.

What’s the main drawback of keeping business logic inside a single StatefulWidget?

a)

UI and logic become tightly coupled, reducing readability and testability

b)

It automatically rebuilds only parts of the widget tree

c)

It eliminates the need for any state management library

d)

It speeds up widget rendering too much

4.

Which of these was not listed as a Flutter state-management solution in the slides?

a)

Redux

b)

MobX

c)

Riverpod

d)

Provider

5.

What key simplification does Cubit introduce over Bloc?

a)

It removes the event class and state changes are emitted directly

b)

It eliminates the need for a build() method

c)

It uses setState() under the hood

d)

It stores state in a global singleton by default

6.

Which Bloc wrapper is used to inject a Cubit/Bloc instance into the widget tree?

a)

BlocBuilder

b)

BlocListener

c)

BlocProvider

d)

BlocConsumer

7.

Which BloC wrapper should you use when you want to rebuild a widget in response to more than one state?

a)

BlocSelector

b)

BlocListener

c)

BlocConsumer

d)

BlocBuilder

8.

If you need to perform side effects (e.g., show a dialog) when the state changes, which wrapper is appropriate?

a)

BlocBuilder

b)

BlocSelector

c)

BlocListener

d)

BlocProvider

9.

You want both UI rebuilding and side-effects in one place—what do you choose?

a)

BlocSelector

b)

BlocProvider

c)

BlocListener

d)

BlocConsumer

10.

To listen to only a specific slice of the state and avoid unnecessary rebuilds, which wrapper do you pick?

a)

BlocSelector

b)

BlocListener

c)

BlocConsumer

d)

BlocBuilder