We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa7148b commit aae1458Copy full SHA for aae1458
packages/flet/lib/src/utils/desktop.dart
@@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart';
2
import 'package:flutter/widgets.dart';
3
import 'package:window_manager/window_manager.dart';
4
import 'package:window_to_front/window_to_front.dart';
5
+import 'package:flutter/services.dart';
6
7
import '../models/window_media_data.dart';
8
@@ -244,9 +245,15 @@ Future blurWindow() async {
244
245
}
246
247
Future destroyWindow() async {
- if (isDesktop()) {
248
+ if (isDesktop() || isMobile()) {
249
debugPrint("destroyWindow()");
250
+ }
251
+ if (isDesktop()) {
252
await windowManager.destroy();
253
+ } else if (defaultTargetPlatform == TargetPlatform.iOS) {
254
+ exit(0);
255
+ } else if (defaultTargetPlatform == TargetPlatform.android) {
256
+ SystemNavigator.pop();
257
258
259
0 commit comments