backup: before proxies page modernization
This commit is contained in:
@@ -10,6 +10,7 @@ bool showDrawerButton(BuildContext context) {
|
||||
final String location = GoRouterState.of(context).uri.path;
|
||||
if (location == const HomeRoute().location || location == const ProfilesOverviewRoute().location) return true;
|
||||
if (location.startsWith(const ProxiesRoute().location)) return true;
|
||||
if (location.startsWith(const PerAppProxyRoute().location)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -31,11 +32,13 @@ class NestedAppBar extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
RootScaffold.canShowDrawer(context);
|
||||
final hasDrawer = RootScaffold.stateKey.currentState?.hasDrawer ?? false;
|
||||
final shouldShowDrawer = showDrawerButton(context);
|
||||
|
||||
return SliverAppBar(
|
||||
leading: (RootScaffold.stateKey.currentState?.hasDrawer ?? false) && showDrawerButton(context)
|
||||
? DrawerButton(
|
||||
leading: hasDrawer && shouldShowDrawer
|
||||
? IconButton(
|
||||
icon: const Icon(Icons.menu),
|
||||
onPressed: () {
|
||||
RootScaffold.stateKey.currentState?.openDrawer();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user