FlutterWindowClosePluginWeb constructor

FlutterWindowClosePluginWeb()

Implementation

FlutterWindowClosePluginWeb() {
  html.window.onBeforeUnload.listen((event) {
    if (event is html.BeforeUnloadEvent) {
      if (_returnValue != null) {
        event.returnValue = _returnValue;
      }
    }
  });
}