onEventDone property

  1. @override
Stream get onEventDone
override

A synchronous stream that fires when the last turn in an event completes. This indicates VM event loop end.

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 onEventDone {
  _onEventDoneController ??= StreamController.broadcast(sync: true);
  return _onEventDoneController!.stream;
}