Better side navigation

🐛 Bug fixes and optimizations
This commit is contained in:
2024-09-13 20:22:10 +08:00
parent dd01f964d4
commit b449735bf5
33 changed files with 212 additions and 182 deletions

View File

@@ -25,7 +25,7 @@ class CenteredShell extends StatelessWidget {
leading: AppBarLeadingButton.adaptive(context),
title: AppBarTitle(state.topRoute?.name?.tr ?? 'page'.tr),
centerTitle: false,
toolbarHeight: SolianTheme.toolbarHeight(context),
toolbarHeight: AppTheme.toolbarHeight(context),
)
: null,
body: Center(

View File

@@ -41,10 +41,10 @@ class RootShell extends StatelessWidget {
return Scaffold(
key: rootScaffoldKey,
drawer: SolianTheme.isLargeScreen(context)
drawer: AppTheme.isLargeScreen(context)
? null
: AppNavigationDrawer(routeName: routeName),
body: SolianTheme.isLargeScreen(context)
body: AppTheme.isLargeScreen(context)
? Row(
children: [
if (showNavigation) AppNavigationDrawer(routeName: routeName),

View File

@@ -29,9 +29,9 @@ class SidebarShell extends StatelessWidget {
flex: 2,
child: child,
),
if (SolianTheme.isExtraLargeScreen(context))
if (AppTheme.isExtraLargeScreen(context))
const VerticalDivider(thickness: 0.3, width: 1),
if (SolianTheme.isExtraLargeScreen(context))
if (AppTheme.isExtraLargeScreen(context))
Flexible(
flex: 1,
child: sidebar ?? const SidebarPlaceholder(),
@@ -47,10 +47,10 @@ class SidebarShell extends StatelessWidget {
leading: AppBarLeadingButton.adaptive(context),
title: AppBarTitle(state.topRoute?.name?.tr ?? 'page'.tr),
centerTitle: false,
toolbarHeight: SolianTheme.toolbarHeight(context),
toolbarHeight: AppTheme.toolbarHeight(context),
)
: null,
body: SolianTheme.isLargeScreen(context)
body: AppTheme.isLargeScreen(context)
? Row(
children: sidebarFirst
? buildContent(context).reversed.toList()

View File

@@ -32,11 +32,11 @@ class TitleShell extends StatelessWidget {
title ?? (state!.topRoute?.name?.tr ?? 'page'.tr),
),
centerTitle: isCenteredTitle,
toolbarHeight: SolianTheme.toolbarHeight(context),
toolbarHeight: AppTheme.toolbarHeight(context),
actions: [
const BackgroundStateWidget(),
SizedBox(
width: SolianTheme.isLargeScreen(context) ? 8 : 16,
width: AppTheme.isLargeScreen(context) ? 8 : 16,
),
],
)