mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-18 02:07:43 +00:00
fix exit button on windows
This commit is contained in:
parent
bf04505d40
commit
c6dd9394be
1 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
@ -219,7 +221,11 @@ class _DesktopMenuState extends ConsumerState<DesktopMenu> {
|
||||||
onChanged: (_) {
|
onChanged: (_) {
|
||||||
// todo: save stuff/ notify before exit?
|
// todo: save stuff/ notify before exit?
|
||||||
// exit(0);
|
// exit(0);
|
||||||
|
if (Platform.isWindows) {
|
||||||
|
exit(0);
|
||||||
|
} else {
|
||||||
SystemNavigator.pop();
|
SystemNavigator.pop();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
controller: controllers[7],
|
controller: controllers[7],
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue