MaterialDateGridBase constructor

MaterialDateGridBase(
  1. Clock clock,
  2. CalendarState initialState,
  3. ChangeDetectorRef changeDetector,
  4. DomService _domService,
  5. String mode,
)

Implementation

MaterialDateGridBase(Clock clock, CalendarState initialState,
    this.changeDetector, this._domService, String mode)
    : paddingTop = MIN_BUFFER_SIZE_PX,
      paddingBottom = MIN_BUFFER_SIZE_PX,
      today = Date.today(clock),
      model =
          ObservableReference<CalendarState>(initialState, coalesce: true) {
  // Get the 1-indexed starting weekday for the current locale, and use that.
  startingWeekday = DateFormat().dateSymbols.FIRSTDAYOFWEEK + 1;

  if (mode.isNotEmpty) {
    _mode = fuzzyParseEnum(CalendarSelectionMode.values, mode);
  }
}