events static method
Returns a stream of browser events which were observed while it was open.
See CloseEvent & RedirectEvent for details on the events.
Only supported on iOS. Returns a empty stream other platforms.
Implementation
static Stream<BrowserEvent> events() {
if (!Platform.isIOS) {
return Stream.empty();
}
return _eventChannel
.receiveBroadcastStream()
.map<Map<String, String>>((event) => Map<String, String>.from(event))
.map((event) => BrowserEvent.fromMap(event)!);
}