File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111import 'dart:async' ;
1212import 'dart:io' ;
1313import 'dart:math' ;
14+ import 'dart:ui' ;
1415
1516import 'package:coinlib_flutter/coinlib_flutter.dart' ;
1617import 'package:compat/compat.dart' as lib_monero_compat;
@@ -621,6 +622,21 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
621622 }
622623 }
623624
625+ @override
626+ Future <AppExitResponse > didRequestAppExit () async {
627+ debugPrint ("didRequestAppExit called" );
628+ if (Platform .isMacOS) {
629+ // On macOS, mwebd fails to shut down, hanging the app on close.
630+ //
631+ // Exiting is a hack fix for this issue.
632+
633+ // await ref.read(pMwebService).shutdown();
634+ // Something like the above would probably be prudent to make.
635+ exit (0 );
636+ }
637+ return AppExitResponse .exit;
638+ }
639+
624640 /// should only be called on android currently
625641 Future <void > getOpenFile () async {
626642 // update provider with new file content state
You can’t perform that action at this time.
0 commit comments