only pad on oceanBreeze theme

This commit is contained in:
julian 2023-01-24 12:17:36 -06:00
parent ecd5df1ca0
commit a0bb793eff

View file

@ -17,6 +17,8 @@ class Background extends StatelessWidget {
Widget build(BuildContext context) {
Color? color;
bool shouldPad = false;
switch (Theme.of(context).extension<StackColors>()!.themeType) {
case ThemeType.light:
case ThemeType.dark:
@ -24,6 +26,9 @@ class Background extends StatelessWidget {
color = Theme.of(context).extension<StackColors>()!.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,