💄 Optimized for navigation drawer

This commit is contained in:
2024-07-13 18:54:08 +08:00
parent 201c38800b
commit a68a78597e
15 changed files with 143 additions and 93 deletions

View File

@ -33,10 +33,7 @@ class RootShell extends StatelessWidget {
key: rootScaffoldKey,
drawer: SolianTheme.isLargeScreen(context)
? null
: AppNavigationDrawer(
key: const ValueKey('navigation-drawer'),
routeName: routeName,
),
: AppNavigationDrawer(routeName: routeName),
body: SolianTheme.isLargeScreen(context)
? Row(
children: [

View File

@ -7,6 +7,7 @@ import 'package:solian/widgets/app_bar_leading.dart';
class TitleShell extends StatelessWidget {
final bool showAppBar;
final bool isCenteredTitle;
final GoRouterState state;
final Widget child;
@ -15,6 +16,7 @@ class TitleShell extends StatelessWidget {
required this.child,
required this.state,
this.showAppBar = true,
this.isCenteredTitle = false,
});
@override
@ -24,7 +26,7 @@ class TitleShell extends StatelessWidget {
? AppBar(
leading: AppBarLeadingButton.adaptive(context),
title: AppBarTitle(state.topRoute?.name?.tr ?? 'page'.tr),
centerTitle: false,
centerTitle: isCenteredTitle,
toolbarHeight: SolianTheme.toolbarHeight(context),
)
: null,