New App Layout
Signed-off-by: Andreas Fahrecker <AndreasFahrecker@gmail.com>
This commit is contained in:
@ -19,7 +19,8 @@ class TimeProgress {
|
||||
|
||||
factory TimeProgress.initialDefault() {
|
||||
int thisYear = DateTime.now().year;
|
||||
return TimeProgress("Initial Name", DateTime(thisYear - 1), DateTime(thisYear + 1));
|
||||
return TimeProgress(
|
||||
"Initial Name", DateTime(thisYear - 1), DateTime(thisYear + 1));
|
||||
}
|
||||
|
||||
TimeProgress copyWith(
|
||||
@ -48,6 +49,16 @@ class TimeProgress {
|
||||
return this.daysBehind() / (this.allDays() / 100) / 100;
|
||||
}
|
||||
|
||||
bool hasStarted() {
|
||||
return DateTime.now().millisecondsSinceEpoch >
|
||||
startTime.millisecondsSinceEpoch;
|
||||
}
|
||||
|
||||
bool hasEnded() {
|
||||
return DateTime.now().millisecondsSinceEpoch >
|
||||
endTime.millisecondsSinceEpoch;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
id.hashCode ^ name.hashCode ^ startTime.hashCode ^ endTime.hashCode;
|
||||
|
Reference in New Issue
Block a user