DatePicker constructor
const
DatePicker({
- Key? id,
- required DatePickerState state,
- DateTime? min,
- DateTime? max,
- void onSubmit(
- DateTime value
- void onChanged(
- DateTime value
- List<
String> monthNames = const ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], - List<
String> weekdayNames = const ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'], - int firstDayOfWeek = 1,
- Style? headerStyle,
- Style? weekdayStyle,
- Style? dayStyle,
- Style? selectedStyle,
- Style? cursorStyle,
- Style? outsideStyle,
- 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);