Intermediate questions test whether you can connect small concepts into reliable behavior. Explain the sequence of events and the failure paths, rather than listing package names.
Why should a FutureBuilder future be stable?
Creating a request inside build can restart work on unrelated rebuilds. Store or obtain the future through a deliberate owner, and replace it when the intended inputs or retry action change.
How do Future and Stream differ?
A Future represents one eventual result or error. A Stream can deliver multiple events over time. Choosing a stream does not remove the need for subscription ownership, cancellation and error handling.
Where should shared state live?
At the narrowest owner that can support every consumer’s lifecycle. Lift state to a common feature owner when siblings need it. Duplicating business values inside several widget states creates synchronization problems.
How would you prevent duplicate pagination requests?
Track in-flight work, the cursor and whether more data exists. Reject repeated triggers while a request is active. A later-page failure should preserve earlier items and expose a targeted retry.
Why parse JSON into a model?
External payloads need validation at a clear boundary. Typed models reduce unchecked map access throughout the interface. A cast does not replace checking malformed or missing fields.
How do you return a value from a screen?
Await a typed route result and pop the destination with that result. Handle null as cancellation. If subsequent work uses the caller’s context, check that it is still mounted after the wait.
Provider, Riverpod or Bloc?
Explain the feature requirements first: scope, lifetime, asynchronous behavior and testing. Compare how each approach models the same behavior. A blanket claim that one package is always fastest or most professional is not a design argument.
How do you test a failed request?
Inject a fake client or repository that produces a controlled failure. Assert the visible error or state transition, then the retry behavior. Do not rely on a random external service being offline.
Scenario to discuss
A user searches for “layout”, then “widgets”. The earlier request completes last. Describe how you would prevent stale results from replacing the newer query. Cancellation or request identity can help; a loading boolean alone is insufficient.
Explain the failure path in order
For a request question, state what the user sees before the request, what happens while it is pending, how failure is represented and which action retries it. Add what happens if the user changes the query or leaves the feature before completion.
That sequence reveals whether the state owner, lifetime and data boundary are understood. Naming a package without tracing those events does not answer the architecture question.
Practise with pagination and repository boundaries , then describe how a fake dependency can reproduce each failure in a test.
Practice and verification
Sketch a searchable paginated list with states and ownership. Cover initial loading, empty results, a failed later page, query replacement and leaving the screen before completion. Relate the design to one project you have actually built.