Prepare for your Flutter developer interview with these 30 essential questions covering basic, intermediate, and advanced topics. Whether you’re a fresher, have 1-3 years, or 3-6 years of experience, these questions and detailed answers will help you master Flutter concepts, widgets, state management, and more.
Basic Flutter Interview Questions
1. What is Flutter?
Flutter is an open-source UI software development kit created by Google for building natively compiled applications for mobile, web, and desktop from a single codebase.[1][4]
2. What is Dart, and why is it used in Flutter?
Dart is a client-optimized programming language used in Flutter for its fast performance, JIT and AOT compilation, and support for reactive UI development.[1][2]
3. Differentiate between StatelessWidget and StatefulWidget in Flutter.
StatelessWidget is immutable and doesn’t change state, while StatefulWidget is mutable and rebuilds when its state changes using setState().[1][2]
4. What are the different types of widgets in Flutter?
Flutter widgets are divided into StatelessWidget (static UI), StatefulWidget (dynamic UI), and include layout widgets like Container, Row, Column, and input widgets like TextField.[1]
5. What is the difference between hot reload and hot restart in Flutter?
Hot reload injects code changes instantly without losing state, while hot restart rebuilds the app completely but faster than a full build.[1]
6. What is BuildContext in Flutter and why is it needed?
BuildContext represents the location of a widget in the widget tree and is needed for accessing inherited widgets, themes, and navigating the UI hierarchy.[2]
7. What are packages and plugins in Flutter?
Packages are Dart libraries for reusable code, while plugins provide platform-specific functionality like camera access through platform channels.[2][6]
8. What are the different build modes in Flutter?
Flutter has debug mode (development with full debugging), profile mode (performance testing), and release mode (optimized production builds).[2]
9. Differentiate between final, const, and static keywords in Dart.
final is runtime immutable, const is compile-time constant, and static belongs to the class rather than instances.[2]
10. What is the difference between WidgetsApp and MaterialApp in Flutter?
WidgetsApp provides basic app structure, while MaterialApp adds Material Design components like AppBar, Scaffold, and navigation.[2]
Intermediate Flutter Interview Questions
11. What is FutureBuilder in Flutter and how is it used?
FutureBuilder builds UI based on the state of a Future (loading, success, error), ideal for asynchronous data like API calls.[2]
FutureBuilder<String>(
future: fetchData(),
builder: (context, snapshot) {
if (snapshot.hasData) return Text(snapshot.data!);
return CircularProgressIndicator();
},
)
12. How do you make HTTP requests in Flutter?
Use the http package to perform GET/POST requests and handle responses with async/await or Futures.[2]
final response = await http.get(Uri.parse('https://api.example.com/data'));
if (response.statusCode == 200) {
return json.decode(response.body);
}
13. What is a Ticker in Flutter?
Ticker provides a callback at a specific frame rate (typically 60fps) for smooth animations in AnimationController.[4]
14. Explain the process of creating custom widgets in Flutter.
Create a class extending StatelessWidget or StatefulWidget, override the build() method, and compose other widgets for reusability.[2]
15. What is typedef in Dart?
Typedef creates an alias for a function type, improving code readability for complex callback signatures.[2]
16. Differentiate between Stream and Future in Flutter.
Future handles single asynchronous results, while Stream handles multiple sequential events over time.[2]
17. What is a Factory constructor in Dart?
Factory constructor returns an instance (possibly cached) without always creating a new object, useful for singletons.[2]
18. What is assert used for in Dart and Flutter?
Assert checks conditions in debug mode; if false, it throws an error to validate assumptions during development.[2]
19. How do you handle exceptions in Flutter?
Use try-catch blocks for synchronous code and .catchError() or FutureBuilder error handling for async operations.[2][3]
20. What is a Singleton class in Flutter?
Singleton ensures only one instance exists using a private constructor and static instance getter.[2]
class MySingleton {
static final MySingleton _instance = MySingleton._internal();
factory MySingleton() => _instance;
MySingleton._internal();
}
Advanced Flutter Interview Questions
21. What are Isolates in Flutter?
Isolates are independent workers with separate memory and event loops, enabling true concurrency in Dart.[2]
22. What is Flutter Tree Shaking?
Tree shaking removes unused code during AOT compilation to reduce app size and improve performance.[2]
23. What is vsync in Flutter animations?
vsync synchronizes animations with the device’s display refresh rate using a TickerProvider for smooth 60fps rendering.[2]
24. Explain the Flutter architecture layers.
Framework (Dart widgets, rendering), Engine (C++ for graphics, text), and Embedder (platform-specific binding).[4]
25. What are DevTools in Flutter?
DevTools is a suite for debugging, profiling performance, inspecting widgets, and analyzing network calls.[2][4]
26. How do you optimize Flutter app performance at Flipkart?
Use RepaintBoundary to isolate expensive paints, const constructors, and ListView.builder for large lists instead of Column.[1]
27. What is the event loop in Dart?
The event loop handles asynchronous tasks in a single thread using microtasks, events, and timers for non-blocking operations.[2]
28. How would you implement state management in a complex Salesforce app using Flutter?
Use Provider or Riverpod for scoped state, BLoC for business logic separation, avoiding deep widget tree rebuilds.[3][5]
29. What strategies do you use for testing Flutter apps at Atlassian?
Unit tests for logic, widget tests for UI components, integration tests for app flows using flutter_test package.[2][3]
30. How do you create performant animations in a Zoho Flutter dashboard?
Use AnimatedBuilder with AnimationController and TickerProviderStateMixin, limiting rebuilds with implicit animations.[1][2]