finished new live card during lesson part

This commit is contained in:
Kima
2024-05-01 22:24:19 +02:00
parent d84a9892c8
commit 6ba105f08c
5 changed files with 380 additions and 114 deletions

View File

@@ -212,6 +212,10 @@ class HomePageState extends State<HomePage> with TickerProviderStateMixin {
// currentState = LiveCardState.empty;
// }
// TODO: REMOVE IN PRODUCTION BUILD!!!
print(_liveCard.currentState);
_liveCard.currentState = LiveCardState.morning;
return Scaffold(
body: Stack(
children: [
@@ -321,8 +325,11 @@ class HomePageState extends State<HomePage> with TickerProviderStateMixin {
// expandedHeight: _liveCardAnimation.value * 238.0,
expandedHeight: _liveCardAnimation.value *
(_liveCard.currentState == LiveCardState.morning
? 280.0
: 238.0),
? 274.0
: (_liveCard.currentState ==
LiveCardState.duringLesson
? 288.0
: 238.0)),
// Live Card
flexibleSpace: FlexibleSpaceBar(
@@ -330,12 +337,17 @@ class HomePageState extends State<HomePage> with TickerProviderStateMixin {
padding: EdgeInsets.only(
left: 24.0,
right: 24.0,
top: (_liveCard.currentState ==
LiveCardState.morning
top: ((_liveCard.currentState ==
LiveCardState.morning ||
_liveCard.currentState ==
LiveCardState.duringLesson)
? 0.0
: 62.0) +
MediaQuery.of(context).padding.top,
bottom: 52.0,
bottom: _liveCard.currentState ==
LiveCardState.morning
? 44.0
: 52.0,
),
child: Transform.scale(
scale: _liveCardAnimation.value,