81 Flutter interview questions with answers
81 Flutter interview questions with detailed answers, sorted from basic to advanced. Free to practice, with progress saved automatically.
All Flutter interview questions
What is the difference between `var`, `dynamic`, and `final` in Dart?
What is null safety in Dart and why does it matter?
What is the null assertion operator (`!`) and when should you use it?
What are null-aware operators in Dart? Name three examples.
Explain the difference between a `List`, `Set`, and `Map` in Dart.
What is a `Future` in Dart and how is it different from a `Stream`?
What is the `async`/`await` syntax in Dart?
What is type promotion in Dart?
What are named and positional parameters in Dart functions?
What is a closure in Dart?
What is the difference between `extends`, `implements`, and `with` (mixin) in Dart?
What is the difference between `StatelessWidget` and `StatefulWidget`?
What is `BuildContext` and why is it important?
Explain the widget tree, element tree, and render tree in Flutter.
What is the purpose of widget `Key`s and when should you use them?
What is the difference between `ValueKey`, `ObjectKey`, and `UniqueKey`?
What is `const` constructor and why is it important for Flutter performance?
Explain the Flutter layout system: how do `Column`, `Row`, `Expanded`, and `Flexible` work?
What is `setState()` and why does calling it trigger a rebuild?
What is the lifecycle of a `StatefulWidget`? List the key methods.
Why is `dispose()` important and what should you clean up there?
What's the purpose of `RepaintBoundary` and when should you use it?
What is state management and why is it important?
What are the problems with using `setState()` for complex apps?
What is the Provider pattern and how does it work?
What is Riverpod and how is it different from Provider?
Explain the BLoC pattern and why interviewers ask about it.
Compare Provider, Riverpod, and BLoC: when would you use each?
What is `ChangeNotifier` and when do you use it?
What is `Selector` in Provider and why use it instead of `Consumer`?
What is `GetIt` and how does it relate to state management?
How do you test state management code (Provider/Riverpod/BLoC)?
What is the difference between the old `Navigator` (v1) and modern routing approaches?
What is GoRouter and what problems does it solve?
How do you pass data between screens in Flutter?
What is deep linking and how does GoRouter support it?
How do you handle navigation state with GoRouter?
What is `ShellRoute` in GoRouter and when do you use it?
How do you implement authentication guards with GoRouter?
What problems occur with Navigator 1.0 named routes at scale?
What is clean architecture and why is it important for large apps?
What is the repository pattern and how does it work?
What is dependency injection and how do you implement it in Flutter?
Explain the difference between singleton and factory patterns in Flutter.
What is MVVM architecture in Flutter and how does it differ from MVC?
What is the use-case layer in clean architecture and why include it?
How do you structure folders/packages in a clean architecture Flutter app?
What is the difference between entity and model in Flutter architecture?
What are isolates in Dart and when do you use them?
What are platform channels and when do you use them?
How do you handle errors and exceptions in async Dart code?
What is `Future.wait()` and when do you use it?
How do you profile and optimize Flutter app performance?
What is the difference between `ListView.builder` and `ListView` for long lists?
How do you implement CI/CD for Flutter apps?
What are the differences between debug, profile, and release builds in Flutter?
How do you test Flutter apps? What's the difference between unit, widget, and integration tests?
What is `WidgetsFlutterBinding` and when do you use it?
What are Records in Dart and how do they enable multi-value returns?
How does pattern matching work in Dart 3? Give a practical example.
How does a switch expression differ from a switch statement in Dart, and when should you use it?
What do class modifiers (`base`, `interface`, `final`) do in Dart 3?
What is a sealed class in Dart and why is it more useful than an abstract class in some cases?
What is Impeller and why did Flutter switch to it as the default rendering engine?
How does WebAssembly (WASM) improve Flutter Web performance?
What is tree-shaking in Flutter release builds and why does it reduce app size?
What are Signals in Flutter and when should you use them over Riverpod?
How does Riverpod (2.x+) differ from Provider in terms of memory efficiency and type safety?
When should you choose BLoC over Riverpod for state management?
How do you implement offline persistence with Riverpod?
What are the key differences between building Flutter Web vs traditional web frameworks?
What are the platform-specific considerations for Flutter Desktop (Windows/macOS)?
How does Dio differ from the default `http` package and when should you use it?
How do you integrate Firebase Authentication in Flutter and what are common pitfalls?
What is Shorebird code push and when should you use it instead of App Store/Play Store updates?
What is `InheritedWidget` and how does it pass state down the widget tree? (the foundation of Provider)
Contrast `StreamBuilder` and `FutureBuilder`. When do you use each?
What is the `Hero` widget and how does shared-element animation work across screens?
What is `MediaQuery` and how do you use it to build responsive/adaptive layouts?
Contrast implicit and explicit animations in Flutter (`AnimationController` + `Tween`).
What is `GestureDetector` and how does the "gesture arena" resolve gesture conflicts?