1
Fork 0

style(timer_page): 💄 rm unnecessary borders

This commit is contained in:
Hubert Chen 2023-10-09 09:01:19 +08:00
parent fc89c2f4f5
commit 66e1ef35d3
Signed by: trle5
GPG Key ID: 74D8BCE883FDDEE2
1 changed files with 29 additions and 33 deletions

View File

@ -100,42 +100,38 @@ class _TimersPageState extends State<TimersPage> with TickerProviderStateMixin{
},
child: Padding(
padding: const EdgeInsets.symmetric(horizontal:16.0, vertical:2.0),
child: Stack(
children: [
Container( // Card background
decoration: BoxDecoration(
color: theme.colorScheme.secondaryContainer.withAlpha(60),
borderRadius: myBorderRadius,
),
child: timerBlankCard(timerContainerCardColorAlpha),
),
AnimatedContainer( // Progress bar
duration: Duration(seconds: animationDurationSeconds.toInt()),
alignment: Alignment.centerLeft,
width: MediaQuery.of(context).size.width * currentProgress,
decoration: BoxDecoration(
color: theme.colorScheme.secondaryContainer.withAlpha(30),
borderRadius: myBorderRadius,
),
child: timerBlankCard(theme.colorScheme.primaryContainer.withAlpha(120)),
),
Card( // Time and text
color: timerContainerCardColorAlpha,
elevation: 0.0,
borderOnForeground: false,
child: ListTile(
title: Text(
'12:34',
style: theme.textTheme.titleLarge!.copyWith(color: theme.colorScheme.primary),
child: Stack(
children: [
Container( // Card background
decoration: BoxDecoration(
color: theme.colorScheme.secondaryContainer.withAlpha(60),
borderRadius: myBorderRadius,
),
subtitle: const Text(
'Countdown: 05:00',
child: timerBlankCard(timerContainerCardColorAlpha),
),
AnimatedContainer( // Progress bar
duration: Duration(seconds: animationDurationSeconds.toInt()),
alignment: Alignment.centerLeft,
width: MediaQuery.of(context).size.width * currentProgress,
child: timerBlankCard(theme.colorScheme.primaryContainer.withAlpha(192)),
),
Card( // Time and text
color: timerContainerCardColorAlpha,
elevation: 0.0,
borderOnForeground: false,
child: ListTile(
title: Text(
'12:34',
style: theme.textTheme.titleLarge!.copyWith(color: theme.colorScheme.primary),
),
subtitle: const Text(
'Countdown: 05:00',
),
),
),
),
],
)
),
],
)
),
);
},
),