Created DatePickerBtn and Started Using it in ProgressCreationScreen

Signed-off-by: Andreas Fahrecker <AndreasFahrecker@gmail.com>
This commit is contained in:
Andreas Fahrecker
2021-02-11 17:05:23 +01:00
parent 6dde08d74d
commit 763cf9d627
4 changed files with 77 additions and 37 deletions

View File

@ -12,9 +12,11 @@ class TimeProgress {
TimeProgress(this.name, this.startTime, this.endTime, {String id})
: id = id ?? Uuid().generateV4() {
if (this.name == null || this.name == "") {
if (this.name == null || this.name == "")
throw new TimeProgressInvalidNameException(this.name);
}
if (!this.startTime.isBefore(this.endTime))
throw new TimeProgressStartTimeIsNotBeforeEndTimeException(
startTime, endTime);
}
factory TimeProgress.initialDefault() {