added release confetti and welcome message

This commit is contained in:
Kima
2023-05-29 10:05:25 +02:00
parent 7543f946f2
commit 5d18354cbb
3 changed files with 21 additions and 4 deletions

View File

@@ -108,6 +108,16 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
now.day == user.student?.birth.day) {
greeting = "happybirthday";
if (NavigationScreen.of(context)?.init("confetti") ?? false) {
_confettiController =
ConfettiController(duration: const Duration(seconds: 3));
Future.delayed(const Duration(seconds: 1))
.then((value) => mounted ? _confettiController?.play() : null);
}
} else if (now.isAfter(DateTime(now.year, DateTime.may, 28)) &&
now.isBefore(DateTime(now.year, DateTime.may, 30))) {
greeting = "refilcopen";
if (NavigationScreen.of(context)?.init("confetti") ?? false) {
_confettiController =
ConfettiController(duration: const Duration(seconds: 3));