PrepPilotPractise free

Flutter interview questions

Dart, widgets, state management, rendering

16 questions · Widget · updated November 2026

Practise these as flashcards. One or two lines each; the ones you miss come back first.

Start free

Core questions

What is null safety in Dart and why is it important?

Null safety in Dart ensures that variables can't be null unless explicitly declared as nullable. This helps catch null reference errors at compile time, making the code safer and reducing runtime crashes.

How do you declare an asynchronous function in Dart?

I declare an asynchronous function using the async keyword, and I can use await inside it to wait for Futures to complete. For example: Future<void> fetchData() async { await someAsyncCall(); }.

What is the difference between a StatelessWidget and a StatefulWidget?

A StatelessWidget doesn't store any mutable state and is immutable, so it only rebuilds when its parent changes. A StatefulWidget can hold state that changes over time, and it rebuilds when that state updates.

What does the build method do in a Flutter widget?

The build method returns a widget tree that describes how the UI should look for that widget. It's called whenever the widget needs to be rendered or updated.

Intermediate questions

Explain the purpose of the widget tree, element tree, and render tree in Flutter.

The widget tree defines the UI structure, the element tree manages widget instances and their state, and the render tree handles layout and painting. These layers help Flutter efficiently update and render the UI.

How would you manage state in a medium-sized Flutter app?

For a medium-sized app, I often use Provider or Riverpod for state management because they're simple yet scalable. They allow me to share state across widgets and rebuild only the parts of the UI that need updating.

How do you call native platform code from Flutter?

I use platform channels, which let me send messages between Dart and native code. On the Dart side, I use a MethodChannel, and on the native side, I implement the corresponding handler to execute platform-specific functionality.

What causes jank in Flutter apps and how can you avoid it?

Jank happens when the UI can't keep up with the frame rate, often due to heavy computation or expensive widget builds on the main isolate. I avoid it by keeping build methods lightweight and moving heavy work to isolates or using compute().

What are the advantages of using Riverpod over Provider?

Riverpod offers better testability, improved compile-time safety, and doesn't depend on the widget tree, making it more flexible for complex apps. It also avoids some limitations of Provider, like context scoping issues.

How does Bloc manage state in Flutter?

Bloc uses streams and events to manage state. You dispatch events to the Bloc, which processes them and emits new states, making state transitions predictable and easy to test.

When would you use a StatefulWidget instead of a StatelessWidget?

I use a StatefulWidget when the UI needs to update in response to user interaction or data changes, like toggling a switch or updating a counter. StatelessWidget is better for static content.

Senior questions

Describe how you would debug a performance issue (jank) in a Flutter app.

I'd start by profiling the app with Flutter DevTools to identify dropped frames and slow widget builds. Then, I'd look for expensive operations in the build or layout phases, optimize them, and move heavy computations to isolates if needed.

How would you design a Flutter app that needs to access a custom Bluetooth API on both Android and iOS?

See the answer in the app, free

What are the trade-offs between Provider, Riverpod, and Bloc for state management?

See the answer in the app, free

How do isolates differ from threads, and when would you use them in Flutter?

See the answer in the app, free

How does Flutter ensure efficient UI updates when state changes?

See the answer in the app, free

More Mobile topics