What is a Stream in Dart?
Why Interviewers Ask This
This question tests conceptual clarity. Interviewers want to hear a precise, confident definition before moving to more complex Flutter topics. It also reveals how well you can explain technical ideas to non-experts.
Answer
A Stream in Dart is a sequence of asynchronous events delivered over time — like an ongoing pipe of data rather than a single Future value. Streams can deliver zero or more data events followed by an optional error or done event. They are used for continuous data like WebSocket messages, real-time database updates (Firebase), or user input events. Use StreamBuilder in Flutter to reactively rebuild UI whenever the stream emits a new value.
Pro Tip
This topic has Flutter-specific nuances that differ from general programming. Highlighting those nuances in your answer shows expertise rather than generic knowledge.