File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/flet/lib/src/utils Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart';
2
2
import 'package:flutter/widgets.dart' ;
3
3
import 'package:window_manager/window_manager.dart' ;
4
4
import 'package:window_to_front/window_to_front.dart' ;
5
+ import 'package:flutter/services.dart' ;
5
6
6
7
import '../models/window_media_data.dart' ;
7
8
@@ -244,9 +245,15 @@ Future blurWindow() async {
244
245
}
245
246
246
247
Future destroyWindow () async {
247
- if (isDesktop ()) {
248
+ if (isDesktop () || isMobile () ) {
248
249
debugPrint ("destroyWindow()" );
250
+ }
251
+ if (isDesktop ()) {
249
252
await windowManager.destroy ();
253
+ } else if (defaultTargetPlatform == TargetPlatform .iOS) {
254
+ exit (0 );
255
+ } else if (defaultTargetPlatform == TargetPlatform .android) {
256
+ SystemNavigator .pop ();
250
257
}
251
258
}
252
259
You can’t perform that action at this time.
0 commit comments