Fix mobile routing behavior
This commit is contained in:
@@ -269,7 +269,6 @@ class LogsOverviewRoute extends GoRouteData {
|
||||
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||
if (useMobileRouter) {
|
||||
return const MaterialPage(
|
||||
fullscreenDialog: true,
|
||||
name: name,
|
||||
child: LogsOverviewPage(),
|
||||
);
|
||||
@@ -288,7 +287,6 @@ class SettingsRoute extends GoRouteData {
|
||||
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||
if (useMobileRouter) {
|
||||
return const MaterialPage(
|
||||
fullscreenDialog: true,
|
||||
name: name,
|
||||
child: SettingsOverviewPage(),
|
||||
);
|
||||
@@ -307,7 +305,6 @@ class ConfigOptionsRoute extends GoRouteData {
|
||||
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||
if (useMobileRouter) {
|
||||
return const MaterialPage(
|
||||
fullscreenDialog: true,
|
||||
name: name,
|
||||
child: ConfigOptionsPage(),
|
||||
);
|
||||
@@ -346,7 +343,6 @@ class GeoAssetsRoute extends GoRouteData {
|
||||
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||
if (useMobileRouter) {
|
||||
return const MaterialPage(
|
||||
fullscreenDialog: true,
|
||||
name: name,
|
||||
child: GeoAssetsOverviewPage(),
|
||||
);
|
||||
@@ -369,7 +365,6 @@ class AboutRoute extends GoRouteData {
|
||||
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||
if (useMobileRouter) {
|
||||
return const MaterialPage(
|
||||
fullscreenDialog: true,
|
||||
name: name,
|
||||
child: AboutPage(),
|
||||
);
|
||||
|
||||
@@ -106,18 +106,16 @@ class _CustomAdaptiveScaffold extends HookConsumerWidget {
|
||||
return Scaffold(
|
||||
key: RootScaffold.stateKey,
|
||||
drawer: Breakpoints.small.isActive(context)
|
||||
? SafeArea(
|
||||
child: Drawer(
|
||||
width: (MediaQuery.sizeOf(context).width * 0.88).clamp(0, 304),
|
||||
child: NavigationRail(
|
||||
extended: true,
|
||||
selectedIndex: selectedWithOffset(drawerDestinationRange),
|
||||
destinations: destinationsSlice(drawerDestinationRange)
|
||||
.map((dest) => AdaptiveScaffold.toRailDestination(dest))
|
||||
.toList(),
|
||||
onDestinationSelected: (index) =>
|
||||
selectWithOffset(index, drawerDestinationRange),
|
||||
),
|
||||
? Drawer(
|
||||
width: (MediaQuery.sizeOf(context).width * 0.88).clamp(0, 304),
|
||||
child: NavigationRail(
|
||||
extended: true,
|
||||
selectedIndex: selectedWithOffset(drawerDestinationRange),
|
||||
destinations: destinationsSlice(drawerDestinationRange)
|
||||
.map((dest) => AdaptiveScaffold.toRailDestination(dest))
|
||||
.toList(),
|
||||
onDestinationSelected: (index) =>
|
||||
selectWithOffset(index, drawerDestinationRange),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
|
||||
Reference in New Issue
Block a user