duration method

Duration duration(
  1. SlotTimeUnit other
)

Returns the absolute duration between this SlotTimeUnit and other in minutes.

Implementation

Duration duration(SlotTimeUnit other) {
  return Duration(
    hours: (other.timeOfDay.hour - timeOfDay.hour).abs(),
    minutes: (other.timeOfDay.minute - timeOfDay.minute).abs(),
  );
}