mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-02 09:08:17 +08:00
committed by
GitHub
parent
d4d9fc3405
commit
b3e2dcf2c5
@@ -26,6 +26,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:tray_manager/tray_manager.dart';
|
||||
import 'package:win32/win32.dart' as kernel32;
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
|
||||
class MainApp extends StatefulWidget {
|
||||
@@ -168,7 +169,11 @@ class _MainAppState extends PopScopeState<MainApp>
|
||||
await GStorage.close();
|
||||
await trayManager.destroy();
|
||||
if (Platform.isWindows) {
|
||||
const MethodChannel('window_control').invokeMethod('closeWindow');
|
||||
// flutter_inappwebview
|
||||
// 6.2.0-beta.2+ https://github.com/pichillilorenzo/flutter_inappwebview/issues/2482
|
||||
// 6.1.5 https://github.com/pichillilorenzo/flutter_inappwebview/issues/2512#issuecomment-3031039587
|
||||
final hProcess = kernel32.GetCurrentProcess();
|
||||
kernel32.TerminateProcess(hProcess, 0);
|
||||
} else {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user