streams 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's the difference between a broadcast StreamController and a single-subscription one?
A single-subscription StreamController allows only one listener ever, and buffers events until that listener subscribes; a broadcast StreamController allows multiple simultaneous listeners but doesn't buffer events for listeners that subscribe late.
AdvancedAsync Programming
What are async* generator functions in Dart?
An async* function is a generator that returns a Stream instead of a Future, letting you yield multiple values over time using the same imperative, sequential-looking code style as a normal async function.
Advertisement