futures Flutter Interview Questions
3 questions
Advertisement
IntermediateDart Questions
What is the difference between Future and Stream in Dart?
A Future represents a single asynchronous value that completes once; a Stream represents a sequence of asynchronous values delivered over time, and can emit zero, one, or many events.
IntermediateAsync Programming
What are the common pitfalls of using FutureBuilder?
The most common FutureBuilder bug is passing a new Future instance on every build (e.g. calling a function directly in the future: parameter), which re-triggers the loading state on every rebuild instead of just once.
AdvancedAsync Programming
What is a Completer in Dart and when would you use one?
A Completer lets you manually create and control a Future, resolving it later with .complete() or .completeError() — useful for wrapping callback-based APIs into a Future-based one.
Advertisement