debugCheckIsValidTimetableMonth method

bool debugCheckIsValidTimetableMonth()

Implementation

bool debugCheckIsValidTimetableMonth() {
  assert(() {
    if (isValidTimetableMonth) return true;

    throw FlutterError.fromParts([
      ErrorSummary('Invalid month for timetable: `$this`'),
      ErrorDescription(
        'A month must be an integer between 1 (January) and '
        '${DateTime.monthsPerYear} (December), inclusive.',
      ),
    ]);
  }());
  return true;
}