debugCheckIsValidTimetableTimeOfDay method

bool debugCheckIsValidTimetableTimeOfDay()

Implementation

bool debugCheckIsValidTimetableTimeOfDay() {
  if (kDebugMode && !isValidTimetableTimeOfDay) {
    throw FlutterError.fromParts([
      ErrorSummary('Invalid time of day for timetable: `$this`'),
      ErrorDescription(
        'A time of the day must be a `Duration`',
      ),
    ]);
  }

  return true;
}