DatePicker constructor

const DatePicker({
  1. Key? id,
  2. required DatePickerState state,
  3. DateTime? min,
  4. DateTime? max,
  5. void onSubmit(
    1. DateTime value
    )?,
  6. void onChanged(
    1. DateTime value
    )?,
  7. List<String> monthNames = const ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
  8. List<String> weekdayNames = const ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],
  9. int firstDayOfWeek = 1,
  10. Style? headerStyle,
  11. Style? weekdayStyle,
  12. Style? dayStyle,
  13. Style? selectedStyle,
  14. Style? cursorStyle,
  15. Style? outsideStyle,
  16. Style? disabledStyle,
})

Implementation

const DatePicker({
  Key? id,
  required this.state,
  this.min,
  this.max,
  this.onSubmit,
  this.onChanged,
  this.monthNames = const [
    'January',
    'February',
    'March',
    'April',
    'May',
    'June',
    'July',
    'August',
    'September',
    'October',
    'November',
    'December',
  ],
  this.weekdayNames = const ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'],
  this.firstDayOfWeek = 1,
  this.headerStyle,
  this.weekdayStyle,
  this.dayStyle,
  this.selectedStyle,
  this.cursorStyle,
  this.outsideStyle,
  this.disabledStyle,
})  : _id = id,
      assert(firstDayOfWeek >= 1 && firstDayOfWeek <= 7);