aboutsummaryrefslogtreecommitdiffstats
path: root/lib/data/data_providers/time_notifier.dart
diff options
context:
space:
mode:
authorLisandro Pérez Meyer <lpmeyer@ics.com>2023-11-20 17:47:26 -0300
committerLisandro Perez Meyer <lpmeyer@ics.com>2023-11-21 12:16:40 +0000
commitf533746fd7b07d71a1a3cbec8944056c0d329e84 (patch)
tree58044a004c0ed38d22cae9d6d2edb031a6f29389 /lib/data/data_providers/time_notifier.dart
parentae9ad191316ea506633c19975a7eb2861e8d17ec (diff)
Date time updates
Original from Sabin Sajeevan <ssajeevan@ics.com> Bug-AGL: SPEC-4971 Change-Id: I7a961e57715fdbf8b05f54dfcf8e56159cadd068 Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
Diffstat (limited to 'lib/data/data_providers/time_notifier.dart')
-rw-r--r--lib/data/data_providers/time_notifier.dart3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/data/data_providers/time_notifier.dart b/lib/data/data_providers/time_notifier.dart
index 9737b2b..c290526 100644
--- a/lib/data/data_providers/time_notifier.dart
+++ b/lib/data/data_providers/time_notifier.dart
@@ -11,6 +11,8 @@ class CurrentTimeNotifier extends StateNotifier<DateTime> {
}
bool _hasInitialized = false;
+ int? selectedYear;
+ bool isYearChanged = false;
void _initializeTimer() {
Timer.periodic(const Duration(seconds: 1), (timer) {
@@ -20,5 +22,6 @@ class CurrentTimeNotifier extends StateNotifier<DateTime> {
void setCurrentTime(DateTime newTime) {
state = newTime;
+ selectedYear = newTime.year;
}
}