What is the SnackBar widget?
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 SnackBar is a brief message that appears at the bottom of the screen to provide lightweight feedback about an operation (e.g., "Item deleted"). Show it using ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text("Message"))). You can add an action (like "Undo") to the SnackBar. It automatically disappears after a short duration, or you can set a custom duration. SnackBars are queued — only one is shown at a time.
Pro Tip
Back up your answer with a specific project or situation. Saying 'In my last Flutter project, I used this when...' immediately makes your answer more credible and memorable.
Previous
What is null safety in Dart?
Next
What is the GridView widget and how does it differ from ListView?