DatePickerModel constructor

DatePickerModel({
  1. required bool useYear,
  2. required bool useMonth,
  3. required bool useDay,
  4. required bool useHour,
  5. required bool useMinute,
  6. required bool useWeekDay,
  7. required bool useSecond,
  8. required List<int> dateStart,
  9. required List<int> dateEnd,
  10. List<int>? dateInitial,
})

Implementation

DatePickerModel({
  required this.useYear,
  required this.useMonth,
  required this.useDay,
  required this.useHour,
  required this.useMinute,
  required this.useWeekDay,
  required this.useSecond,
  required this.dateStart,
  required this.dateEnd,
  this.dateInitial
}){
  assert(!useWeekDay || (!useSecond && !useMinute && !useHour), 'WeekDay can only used with Year, Month and Day!');
  setInitialTime();
  setInitialMonthData();
  setInitialDayData();
  setInitialWeekDayData();
  setControllers();
  addListener();
}