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