onError property

Stream<ErrorEvent> get onError

Implementation

Stream<ErrorEvent> get onError {
  late StreamController<ErrorEvent> sc; // ignore: close_sinks
  late MapsEventListener mapsEventListener;
  void start() => mapsEventListener = event.addListener(
        this,
        'error',
        ((ErrorEvent e) => sc.add(e)).toJS,
      );
  void stop() => mapsEventListener.remove();
  sc = StreamController<ErrorEvent>(
    onListen: start,
    onCancel: stop,
    onResume: start,
    onPause: stop,
  );
  return sc.stream;
}