From a0bb793eff6c2ea04d6df9f885cc518e6d4302a4 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 24 Jan 2023 12:17:36 -0600 Subject: [PATCH] only pad on oceanBreeze theme --- lib/widgets/background.dart | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/widgets/background.dart b/lib/widgets/background.dart index c966a5d98..353e3d138 100644 --- a/lib/widgets/background.dart +++ b/lib/widgets/background.dart @@ -17,6 +17,8 @@ class Background extends StatelessWidget { Widget build(BuildContext context) { Color? color; + bool shouldPad = false; + switch (Theme.of(context).extension()!.themeType) { case ThemeType.light: case ThemeType.dark: @@ -24,6 +26,9 @@ class Background extends StatelessWidget { color = Theme.of(context).extension()!.background; break; case ThemeType.oceanBreeze: + shouldPad = true; + color = null; + break; case ThemeType.fruitSorbet: color = null; break; @@ -43,10 +48,12 @@ class Background extends StatelessWidget { children: [ Positioned.fill( child: Padding( - padding: EdgeInsets.only( - top: MediaQuery.of(context).size.height * (1 / 8), - bottom: MediaQuery.of(context).size.height * (1 / 12), - ), + padding: shouldPad + ? EdgeInsets.only( + top: MediaQuery.of(context).size.height * (1 / 8), + bottom: MediaQuery.of(context).size.height * (1 / 12), + ) + : const EdgeInsets.all(0), child: SvgPicture.asset( bgAsset!, fit: BoxFit.fill,