mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-22 18:16:54 +08:00
@@ -34,7 +34,6 @@ class _MainAppState extends State<MainApp>
|
|||||||
with RouteAware, WidgetsBindingObserver, WindowListener, TrayListener {
|
with RouteAware, WidgetsBindingObserver, WindowListener, TrayListener {
|
||||||
final MainController _mainController = Get.put(MainController());
|
final MainController _mainController = Get.put(MainController());
|
||||||
late final _setting = GStorage.setting;
|
late final _setting = GStorage.setting;
|
||||||
static const MethodChannel _channel = MethodChannel('window_control');
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -139,7 +138,7 @@ class _MainAppState extends State<MainApp>
|
|||||||
|
|
||||||
void _onClose() {
|
void _onClose() {
|
||||||
if (Platform.isWindows) {
|
if (Platform.isWindows) {
|
||||||
_channel.invokeMethod('closeWindow');
|
const MethodChannel('window_control').invokeMethod('closeWindow');
|
||||||
} else {
|
} else {
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user