improve ui

This commit is contained in:
nyne
2024-10-26 19:39:12 +08:00
parent e64b69d818
commit 96bf3688d0
12 changed files with 112 additions and 84 deletions

View File

@@ -148,7 +148,7 @@ class _NaviPaneState extends State<NaviPane>
return _NaviPopScope(
action: () {
if (App.mainNavigatorKey!.currentState!.canPop()) {
App.mainNavigatorKey!.currentState!.pop();
App.mainNavigatorKey!.currentState!.maybePop();
} else {
SystemNavigator.pop();
}
@@ -627,16 +627,9 @@ class _NaviPopScope extends StatelessWidget {
? child
: PopScope(
canPop: App.isAndroid ? false : true,
// flutter <3.24.0 api
onPopInvoked: (value) {
action();
},
/*
flutter >=3.24.0 api
onPopInvokedWithResult: (value, result) {
action();
},
*/
child: child,
);
if (popGesture) {