onTurnDone property

  1. @override
Stream get onTurnDone
override

A synchronous stream that fires when the VM turn is finished, which means when the inner (managed) zone has completed it's private microtask queue.

Note:

  • This won't wait for microtasks schedules in outer zones.
  • Causing any turn action, e.g., spawning a Future, within this zone will cause an infinite loop.

Implementation

@override
Stream get onTurnDone {
  if (_onTurnDoneController == null) {
    _onTurnDoneController = StreamController.broadcast(sync: true);
  }
  return _onTurnDoneController!.stream;
}