forked from firka/firka
- Create firka_common package with core helpers (debug, json, icon), theme, and shared widgets (FirkaCard, FirkaShadow, GradeWidget, GradeSmallCard, ClassIconWidget, FirkaIconWidget, DelayedSpinnerWidget, CounterDigitWidget) - Keep Isar models (GenericCacheModel, TimetableCacheModel, HomeworkCacheModel, DatedCacheEntry, util) in firka and firka_wear - not moved to firka_common - Update firka and firka_wear to depend on firka_common for shared UI only - Add configurable roundGrade thresholds for firka settings - Add package param to FirkaIconWidget for app asset paths
18 lines
369 B
Dart
18 lines
369 B
Dart
DateTime? debugFakeTime;
|
|
DateTime? debugSetAt;
|
|
var debugTimeAdvance = false;
|
|
|
|
DateTime timeNow() {
|
|
if (debugFakeTime != null) {
|
|
if (debugTimeAdvance && debugSetAt != null) {
|
|
var diff = DateTime.now().difference(debugSetAt!);
|
|
|
|
return debugFakeTime!.add(diff);
|
|
} else {
|
|
return debugFakeTime!;
|
|
}
|
|
} else {
|
|
return DateTime.now();
|
|
}
|
|
}
|