yoklainterview sim

Flutter Mobile Interview Questions

450 verified Flutter Mobile interview questions — solve with answers, learn from explanations, test yourself in a real simulation.

Try the real simulation →

Sample questions

Fl Dart Async IsolatesDifficulty 1
What does an async function in Dart return, even if you don't write it explicitly?
  • aNothing — async functions are always void.
  • bA Stream of the function's result over time.
  • cThe raw result value, computed synchronously.
  • dA Future wrapping the function's result.
Explanation:Marking a function async makes it return a Future (or Future<void>) automatically, even if the body has no explicit Future type — the compiler wraps the result.
Fl Dart Async IsolatesDifficulty 1
Future<int> fetchValue() async {
  await Future.delayed(Duration(seconds: 1));
  return 42;
}

What happens when fetchValue() is called?
  • aIt blocks the calling code for one second before returning.
  • bIt returns 42 immediately and runs the delay in the background afterward.
  • cIt returns a Future<int> immediately, resolving to 42 after the delay.
  • dIt throws unless the caller also uses await.
Explanation:Calling an async function does not block; it returns a pending Future right away. The caller can await it (or attach .then) to get 42 once the delayed future completes.
Fl Dart Async IsolatesDifficulty 2
A function does final a = await taskA(); final b = await taskB(); where taskA and taskB are independent (don't depend on each other's result). What is the practical downside of writing it this way?
  • ataskB doesn't start until taskA finishes — they run sequentially.
  • bDart will refuse to compile this — independent awaits must use Future.wait.
  • ctaskA and taskB are automatically parallelized regardless of the syntax.
  • dThe code throws a runtime exception because b is declared before a resolves.
Explanation:Each await pauses until that specific future completes before moving to the next line. Since taskB() isn't even called until after taskA finishes, they run one after another; Future.wait([taskA(), taskB()]) would let both start immediately.
Fl Dart Async IsolatesDifficulty 1
What is the key structural difference between a single-subscription Stream and a broadcast Stream?
  • aA single-subscription stream allows only one listener over its lifetime, while a broadcast stream allows multiple listeners.
  • bBroadcast streams can only emit errors, never data.
  • cSingle-subscription streams emit events synchronously, broadcast streams never do.
  • dThere is no real difference; .asBroadcastStream() is purely cosmetic.
Explanation:A single-subscription Stream buffers/produces events only once a single listener attaches, and calling .listen() twice throws. A broadcast stream supports any number of listeners, but doesn't buffer events for listeners that attach late.
Fl Dart Async IsolatesDifficulty 2
final controller = StreamController<int>();
controller.stream.listen((v) => print(v));
controller.add(1);
controller.add(2);

What does this print, assuming no errors?
  • aNothing, because StreamController requires .broadcast() to emit any events.
  • b2 then 1, because the listener attaches after both add calls are scheduled.
  • c1 then 2, in that order.
  • dIt throws because add was called before listen.
Explanation:A default StreamController is single-subscription; since listen is called before any add, the controller has a listener ready and delivers events in the order they were added: 1, then 2.
Fl Dart Async IsolatesDifficulty 1
Why does Dart require actual parallel CPU-bound work to use an Isolate instead of just an async function?
  • aasync functions are physically incapable of calling any CPU-heavy code at all.
  • bA single Dart isolate has one thread and one event loop; async/await doesn't use extra cores.
  • cIsolates are just a different syntax for the exact same single-threaded execution as async.
  • dasync functions can only run inside widget build methods.
Explanation:async/await gives concurrency (interleaving) on a single thread, not parallelism. Heavy synchronous computation still blocks that one thread and the event loop with it. An Isolate gets its own thread and memory, enabling true parallel execution.

Test yourself against the 2400-question Mobile bank.

Start interview