fixed live card bugs
This commit is contained in:
parent
02af238c1b
commit
236c34dbe6
@ -555,7 +555,6 @@ class AbsencesPageState extends State<AbsencesPage>
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
// ide kell valami csik widget diagram idk
|
||||
Container(
|
||||
height: 9.11,
|
||||
decoration: BoxDecoration(
|
||||
@ -570,8 +569,9 @@ class AbsencesPageState extends State<AbsencesPage>
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// es ala ez
|
||||
const SizedBox(
|
||||
height: 3.0,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
|
@ -195,22 +195,22 @@ class HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
||||
// ];
|
||||
// String? selectedValue;
|
||||
|
||||
DateTime now = DateTime.now();
|
||||
// DateTime now = DateTime.now();
|
||||
// DateTime now = DateTime(2024, 4, 22, 5, 55);
|
||||
LiveCardState currentState = LiveCardState.empty;
|
||||
// LiveCardState currentState = LiveCardState.empty;
|
||||
|
||||
if (now.isBefore(DateTime(now.year, DateTime.august, 31)) &&
|
||||
now.isAfter(DateTime(now.year, DateTime.june, 14))) {
|
||||
currentState = LiveCardState.summary;
|
||||
} else if (now.hour >= 12 && now.hour < 20) {
|
||||
currentState = LiveCardState.afternoon;
|
||||
} else if (now.hour >= 20) {
|
||||
currentState = LiveCardState.night;
|
||||
} else if (now.hour >= 5 && now.hour <= 10) {
|
||||
currentState = LiveCardState.morning;
|
||||
} else {
|
||||
currentState = LiveCardState.empty;
|
||||
}
|
||||
// if (now.isBefore(DateTime(now.year, DateTime.august, 31)) &&
|
||||
// now.isAfter(DateTime(now.year, DateTime.june, 14))) {
|
||||
// currentState = LiveCardState.summary;
|
||||
// } else if (now.hour >= 12 && now.hour < 20) {
|
||||
// currentState = LiveCardState.afternoon;
|
||||
// } else if (now.hour >= 20) {
|
||||
// currentState = LiveCardState.night;
|
||||
// } else if (now.hour >= 5 && now.hour <= 10) {
|
||||
// currentState = LiveCardState.morning;
|
||||
// } else {
|
||||
// currentState = LiveCardState.empty;
|
||||
// }
|
||||
|
||||
return Scaffold(
|
||||
body: Stack(
|
||||
@ -320,7 +320,7 @@ class HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
||||
|
||||
// expandedHeight: _liveCardAnimation.value * 238.0,
|
||||
expandedHeight: _liveCardAnimation.value *
|
||||
(currentState == LiveCardState.morning
|
||||
(_liveCard.currentState == LiveCardState.morning
|
||||
? 280.0
|
||||
: 238.0),
|
||||
|
||||
@ -330,7 +330,8 @@ class HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
||||
padding: EdgeInsets.only(
|
||||
left: 24.0,
|
||||
right: 24.0,
|
||||
top: (currentState == LiveCardState.morning
|
||||
top: (_liveCard.currentState ==
|
||||
LiveCardState.morning
|
||||
? 0.0
|
||||
: 62.0) +
|
||||
MediaQuery.of(context).padding.top,
|
||||
|
@ -83,7 +83,7 @@ class LiveCardStateA extends State<LiveCard> {
|
||||
// name: 'name',
|
||||
// );
|
||||
|
||||
final dt = DateTime(2024, 3, 22, 17, 12, 1, 1, 1);
|
||||
// final dt = DateTime(2024, 3, 22, 17, 12, 1, 1, 1);
|
||||
|
||||
switch (liveCard.currentState) {
|
||||
case LiveCardState.summary:
|
||||
@ -217,7 +217,8 @@ class LiveCardStateA extends State<LiveCard> {
|
||||
const SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
SegmentedCountdown(date: dt)
|
||||
SegmentedCountdown(
|
||||
date: liveCard.nextLesson!.start),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user