From 2ad270ef3a0513dc913e1cb6632adc94cbb6ba48 Mon Sep 17 00:00:00 2001 From: getBoolean <19920697+getBoolean@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:41:19 -0600 Subject: [PATCH] Fix logo visual density --- .../presentation/widgets/root_scaffold_shell.dart | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/src/routing/presentation/widgets/root_scaffold_shell.dart b/lib/src/routing/presentation/widgets/root_scaffold_shell.dart index bed6e51d..dd4a8099 100644 --- a/lib/src/routing/presentation/widgets/root_scaffold_shell.dart +++ b/lib/src/routing/presentation/widgets/root_scaffold_shell.dart @@ -94,6 +94,8 @@ class _RootScaffoldShellState extends ConsumerState { ); }, buildLogo: (context, topRoute, index, expanded) { + final visualDensityFactor = + Theme.of(context).visualDensity.horizontal; return expanded ? IntrinsicWidth( child: Row( @@ -120,9 +122,11 @@ class _RootScaffoldShellState extends ConsumerState { ], ), ) - : const Padding( - padding: EdgeInsetsDirectional.all(8.0), - child: _StylizedFlutterLogo(), + : Padding( + padding: EdgeInsetsDirectional.symmetric( + horizontal: 12.0 + visualDensityFactor * 4.0, + ), + child: const _StylizedFlutterLogo(), ); }, child: widget.navigationShell,