Browse Source

neon: Fix navigation getting stuck

pull/271/head
jld3103 2 years ago
parent
commit
a85981a93d
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 8
      packages/neon/neon/lib/src/pages/home.dart

8
packages/neon/neon/lib/src/pages/home.dart

@ -202,15 +202,15 @@ class _HomePageState extends State<HomePage> {
) => ) =>
OptionBuilder<NavigationMode>( OptionBuilder<NavigationMode>(
option: _globalOptions.navigationMode, option: _globalOptions.navigationMode,
builder: (final context, final navigationMode) => BackButtonListener( builder: (final context, final navigationMode) => WillPopScope(
onBackButtonPressed: () async { onWillPop: () async {
if (_scaffoldKey.currentState!.isDrawerOpen) { if (_scaffoldKey.currentState!.isDrawerOpen) {
Navigator.pop(context); Navigator.pop(context);
return false; return true;
} }
_scaffoldKey.currentState!.openDrawer(); _scaffoldKey.currentState!.openDrawer();
return true; return false;
}, },
child: Builder( child: Builder(
builder: (final context) { builder: (final context) {

Loading…
Cancel
Save