mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
Check drawer state when back.
This commit is contained in:
@@ -32,4 +32,4 @@ class MenuItems {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
class BuildData {
|
class BuildData {
|
||||||
static const String name = "ServerBox";
|
static const String name = "ServerBox";
|
||||||
static const int build = 94;
|
static const int build = 95;
|
||||||
static const String engine =
|
static const String engine =
|
||||||
"Flutter 2.10.0 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 5f105a6ca7 (7 days ago) • 2022-02-01 14:15:42 -0800\nEngine • revision 776efd2034\nTools • Dart 2.16.0 • DevTools 2.9.2\n";
|
"Flutter 2.10.0 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision 5f105a6ca7 (7 days ago) • 2022-02-01 14:15:42 -0800\nEngine • revision 776efd2034\nTools • Dart 2.16.0 • DevTools 2.9.2\n";
|
||||||
static const String buildAt = "2022-02-08 21:12:52.441728";
|
static const String buildAt = "2022-02-08 21:30:51.218738";
|
||||||
static const int modifications = 0;
|
static const int modifications = 3;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,6 +83,18 @@ class _MyHomePageState extends State<MyHomePage>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
setTransparentNavigationBar(context);
|
setTransparentNavigationBar(context);
|
||||||
super.build(context);
|
super.build(context);
|
||||||
|
return WillPopScope(
|
||||||
|
child: _buildMain(context),
|
||||||
|
onWillPop: () {
|
||||||
|
if (_advancedDrawerController.value.visible) {
|
||||||
|
_advancedDrawerController.hideDrawer();
|
||||||
|
return Future.value(false);
|
||||||
|
}
|
||||||
|
return Future.value(true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildMain(BuildContext context) {
|
||||||
return AdvancedDrawer(
|
return AdvancedDrawer(
|
||||||
controller: _advancedDrawerController,
|
controller: _advancedDrawerController,
|
||||||
animationCurve: Curves.easeInOutCirc,
|
animationCurve: Curves.easeInOutCirc,
|
||||||
|
|||||||
Reference in New Issue
Block a user