Flutter interviews usually mix three things: Dart language questions, how Flutter actually renders widgets, and state management. Freshers get more of the first; experienced candidates get more performance and architecture. This list covers what I see asked most often when preparing students for Flutter roles, with answers short enough to say in an interview and code that runs on current Flutter with Dart 3.
Dart fundamentals
1. What is Dart and why does Flutter use it?
Dart is a typed, object-oriented language from Google. Flutter uses it because it supports both JIT compilation (fast development with hot reload) and AOT compilation to native machine code (fast startup and predictable performance in release builds). It also compiles to JavaScript and WebAssembly for Flutter web.
2. How does null safety work in Dart?
Since Dart 2.12, and mandatory since Dart 3, types are non-nullable by default. String cannot be null; String? can. Operators: ?. (null-aware access), ?? (default value), ??= (assign if null) and ! (assert non-null, throws if null). The late keyword declares a non-nullable variable that is initialised later, or lazily.
String greet(String? name) => 'Hello, ${name ?? 'guest'}';
3. What is the difference between final and const?
final is assigned once, at runtime. const is a compile-time constant, and a const constructor call creates a canonical instance. In Flutter, const widgets matter for performance: const Text('Hi') is created once and Flutter can skip rebuilding it.
4. What are Future, async and await?
A Future<T> is a value that will be available later, like a network response. async marks a function that returns a Future; await pauses that function until a Future completes, without blocking the UI.
Future<User> loadUser(int id) async {
final response = await http.get(Uri.parse('https://api.example.com/users/$id'));
if (response.statusCode != 200) {
throw Exception('Failed: ${response.statusCode}');
}
return User.fromJson(jsonDecode(response.body) as Map<String, dynamic>);
}
5. What is a Stream?
A sequence of asynchronous events, such as Firebase updates or a WebSocket. Single-subscription streams allow one listener; broadcast streams allow many. Consume with await for or listen, and cancel subscriptions in dispose().
6. Is Dart single-threaded? What are isolates?
Each isolate has its own memory and a single-threaded event loop with a microtask queue and an event queue. async code does not run in parallel; it interleaves on the same isolate. For CPU-heavy work (parsing large JSON, image processing), run it in another isolate with Isolate.run() (or Flutter's compute) so the UI does not drop frames.
7. What are mixins, extension methods and records?
A mixin (mixin Logger { ... }, used with with) shares behaviour across classes without inheritance. Extension methods add methods to existing types. Records (Dart 3) group values without a class: (String, int) pair = ('a', 1);, and patterns let you destructure them. Sealed classes plus switch expressions give exhaustive matching:
sealed class Result {}
class Ok extends Result { Ok(this.value); final String value; }
class Err extends Result { Err(this.error); final Object error; }
String describe(Result r) => switch (r) {
Ok(:final value) => 'ok: $value',
Err(:final error) => 'error: $error',
};
Widgets and rendering
8. What is a widget?
An immutable description of part of the UI. Everything is a widget: layout (Row, Padding), styling (Theme), and gestures (GestureDetector). Widgets are cheap to create; Flutter rebuilds them often and only updates what changed underneath.
9. StatelessWidget vs StatefulWidget?
A StatelessWidget builds from its constructor parameters only. A StatefulWidget pairs with a State object that lives across rebuilds and calls setState() to schedule a rebuild.
class Counter extends StatefulWidget {
const Counter({super.key});
@override
State<Counter> createState() => _CounterState();
}
class _CounterState extends State<Counter> {
int _count = 0;
@override
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: () => setState(() => _count++),
child: Text('Clicked $_count times'),
);
}
}
10. Explain the widget, element and render object trees.
Widgets are configuration. Elements are the instantiated widgets in the tree; they manage lifecycle and hold State. Render objects do layout, painting and hit testing. When you rebuild, Flutter compares new widgets with existing elements; if the type and key match, it updates the element and its render object instead of recreating them. That is why rebuilding is cheap.
11. What is the StatefulWidget lifecycle?
createState → initState (once; start controllers and subscriptions) → didChangeDependencies (when an inherited dependency changes) → build (many times) → didUpdateWidget (parent rebuilt with new config) → deactivate → dispose (release controllers, cancel streams). A classic follow-up: do not call setState after dispose; check mounted after an await.
12. What is BuildContext?
A handle to a widget's location in the tree; it is actually the element. You use it to look up ancestors: Theme.of(context), Navigator.of(context), MediaQuery.sizeOf(context). A common bug is using a context from above a widget you are trying to find, such as calling Scaffold.of(context) with the context of the widget that creates the Scaffold.
13. What are keys and when do you need them?
Keys preserve state when widgets move in a list. Without keys, Flutter matches widgets by type and position, so reordering a list of stateful items can attach the wrong state to the wrong item. Use ValueKey(item.id) for list items; GlobalKey gives access to a widget's state from elsewhere (forms) but is expensive, so use it sparingly.
14. How does layout work in Flutter?
"Constraints go down, sizes go up, parent sets position." A parent passes constraints (min/max width and height) to a child; the child picks a size within them; the parent positions it. Most layout errors, such as the unbounded height error when a ListView sits inside a Column, come from breaking this rule. Fix with Expanded, SizedBox or shrinkWrap (carefully).
15. Expanded vs Flexible?
Both share space in a Row or Column by flex. Expanded forces the child to fill its share; Flexible lets the child be smaller than its share.
16. What is the difference between hot reload and hot restart?
Hot reload injects changed code and rebuilds while keeping state. Hot restart reruns main() and resets state. Changes to initState, global initialisers or native code need a restart or full rebuild.
State management
17. What is InheritedWidget?
A widget that makes data available to all descendants efficiently, and rebuilds dependents when it changes. Theme, MediaQuery and Provider are built on it.
18. Compare setState, Provider, Riverpod and BLoC.
setState: local, ephemeral state in one widget. Fine for a toggle or form field.- Provider: wraps InheritedWidget with a simpler API;
ChangeNotifierpluscontext.watch. A common default. - Riverpod: from the same author as Provider; providers are declared globally, are compile-safe, testable and do not depend on
BuildContextto read. - BLoC / Cubit: events in, states out through streams; strict separation, popular in larger teams.
Interviewers care less about which you pick and more that you can say why business logic should live outside widgets and how you would test it.
19. Show a simple Riverpod example.
final counterProvider = NotifierProvider<CounterNotifier, int>(CounterNotifier.new);
class CounterNotifier extends Notifier<int> {
@override
int build() => 0;
void increment() => state++;
}
class CounterText extends ConsumerWidget {
const CounterText({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
final count = ref.watch(counterProvider);
return Text('$count');
}
}
The app must be wrapped in ProviderScope.
20. How do FutureBuilder and StreamBuilder work, and what is the common mistake?
They rebuild based on a Future's or Stream's snapshot (ConnectionState, hasData, hasError). The common mistake is creating the Future inside build(), which starts a new request on every rebuild. Create it in initState (or in your state management layer) and pass it in.
Navigation, platform and data
21. How does navigation work?
Navigator.push and pop for simple stacks. For deep links, web URLs and nested navigation, most apps use a router package such as go_router, which is built on the Router API (Navigator 2.0).
22. How do you call native Android or iOS code?
Platform channels. A MethodChannel sends a method call from Dart to Kotlin or Swift and gets a result back; EventChannel streams events. Pigeon generates type-safe channel code. For C libraries, use dart:ffi.
const _channel = MethodChannel('app/battery');
Future<int> batteryLevel() async =>
await _channel.invokeMethod<int>('getBatteryLevel') ?? -1;
23. How do you store data locally?
shared_preferences for small key-value settings; SQLite through sqflite or drift for structured data; flutter_secure_storage for tokens. Never store secrets in plain preferences.
24. How do you parse JSON?
Manually with fromJson/toJson, or generate code with json_serializable and build_runner. Mention handling missing fields and type casting from Map<String, dynamic> safely.
Performance and testing
25. How do you keep a Flutter app at a smooth frame rate?
Measure in profile mode with Flutter DevTools, not debug mode. Then: use const constructors, split large build methods into smaller widgets so rebuilds are local, use ListView.builder for long lists, avoid expensive work in build, move heavy computation to an isolate, use RepaintBoundary for complex animations, and size images to their display size. Impeller is now the default renderer on iOS and on modern Android devices, which removed most shader compilation jank.
26. What types of tests does Flutter support?
Unit tests (test package) for logic, widget tests (testWidgets, WidgetTester) that render widgets in a test environment, and integration tests (integration_test) that run the full app on a device or emulator.
testWidgets('counter increments', (tester) async {
await tester.pumpWidget(const MaterialApp(home: Counter()));
await tester.tap(find.byType(ElevatedButton));
await tester.pump();
expect(find.text('Clicked 1 times'), findsOneWidget);
});
27. Flutter vs native Android: how do you answer?
Balanced: Flutter gives one codebase and consistent UI across Android, iOS, web and desktop, with near-native performance. Native Android with Kotlin and Compose gives first-class access to new platform APIs and is the natural choice for apps tightly tied to Android features. Many teams use both. If you know Kotlin too, say so; see the Kotlin interview questions and Jetpack Compose interview questions, since Compose and Flutter share the same declarative ideas.
How to prepare
Build one app with a real API, local storage and a state management library you can defend. Then be ready to explain a rebuild: what triggers it, what Flutter reuses, and how you would make it cheaper. That one explanation covers a third of most Flutter interviews.
Learn Flutter with hands-on projects
Our Flutter training in Chennai covers Dart, widgets, state management and publishing, built around projects rather than slides. Prefer native? See Android training in Chennai, or browse all programs.
K P Ranjith Kumar is the founder of TechManifester and a former Google Certified Associate Android Developer. He has trained Android and Flutter developers for 12+ years, and founded AndroidManifester (now TechManifester) in Chennai in 2016.