diff --git a/lib/screens/mobile/navbar.dart b/lib/screens/mobile/navbar.dart index ab516c5b..e129f80b 100644 --- a/lib/screens/mobile/navbar.dart +++ b/lib/screens/mobile/navbar.dart @@ -124,6 +124,7 @@ class NavRail extends ConsumerWidget { Icons.help, Icons.help_outline, 'About', + showLabel: false, ), const SizedBox(height: 24), customNavigationDestination( @@ -134,6 +135,7 @@ class NavRail extends ConsumerWidget { Icons.settings, Icons.settings_outlined, 'Settings', + showLabel: false, ), ], ), diff --git a/lib/screens/mobile/widgets/page_base.dart b/lib/screens/mobile/widgets/page_base.dart index 42460831..ab2f308c 100644 --- a/lib/screens/mobile/widgets/page_base.dart +++ b/lib/screens/mobile/widgets/page_base.dart @@ -1,8 +1,10 @@ import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:apidash/consts.dart'; +import 'package:apidash/extensions/extensions.dart'; import 'package:apidash/providers/providers.dart'; import 'package:apidash/widgets/window_caption.dart'; +import '../navbar.dart'; class PageBase extends ConsumerWidget { final String title; @@ -13,27 +15,39 @@ class PageBase extends ConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final isDarkMode = ref.watch(settingsProvider.select((value) => value.isDark)); + final scaffold = Scaffold( + backgroundColor: Theme.of(context).colorScheme.background, + appBar: AppBar( + backgroundColor: Theme.of(context).colorScheme.background, + primary: true, + title: Text(title), + centerTitle: true, + ), + body: Padding( + padding: EdgeInsets.only( + bottom: MediaQuery.paddingOf(context).bottom, + ), + child: scaffoldBody, + ), + ); return Stack( children: [ Container( - padding: const EdgeInsets.only(bottom: 70) + + padding: (context.isCompactWindow + ? const EdgeInsets.only(bottom: 70) + : EdgeInsets.zero) + (kIsWindows || kIsMacOS ? kPt28 : EdgeInsets.zero), color: Theme.of(context).colorScheme.surface, - child: Scaffold( - backgroundColor: Theme.of(context).colorScheme.background, - appBar: AppBar( - backgroundColor: Theme.of(context).colorScheme.background, - primary: true, - title: Text(title), - centerTitle: true, - ), - body: Padding( - padding: EdgeInsets.only( - bottom: MediaQuery.paddingOf(context).bottom, - ), - child: scaffoldBody, - ), - ), + child: !context.isCompactWindow + ? Row( + children: [ + const NavRail(), + Expanded( + child: scaffold, + ), + ], + ) + : scaffold, ), if (kIsWindows) SizedBox(