duration property
Duration
get
duration
Gets the duration of the operation.
Implementation
Duration get duration {
if (endTime == null) {
return DateTime.now().difference(startTime);
}
return endTime!.difference(startTime);
}