DateTimeField constructor
DateTimeField({
- required ValueChanged<
DateTime?> ? onChanged, - Key? key,
- DateTime? value,
- VoidCallback? onTap,
- TextStyle? style,
- FocusNode? focusNode,
- bool autofocus = false,
- bool? enableFeedback,
- EdgeInsetsGeometry? padding,
- bool hideDefaultSuffixIcon = false,
- InputDecoration? decoration,
- DateTime? initialPickerDateTime,
- CupertinoDatePickerOptions cupertinoDatePickerOptions = const CupertinoDatePickerOptions(),
- MaterialDatePickerOptions materialDatePickerOptions = const MaterialDatePickerOptions(),
- MaterialTimePickerOptions materialTimePickerOptions = const MaterialTimePickerOptions(),
- DateTimeFieldPickerMode mode = DateTimeFieldPickerMode.dateAndTime,
- DateTimeFieldPickerPlatform pickerPlatform = DateTimeFieldPickerPlatform.adaptive,
- DateTime? firstDate,
- DateTime? lastDate,
- DateFormat? dateFormat,
Implementation
DateTimeField({
required this.onChanged,
super.key,
this.value,
this.onTap,
this.style,
this.focusNode,
this.autofocus = false,
this.enableFeedback,
this.padding,
this.hideDefaultSuffixIcon = false,
this.decoration,
this.initialPickerDateTime,
this.cupertinoDatePickerOptions = const CupertinoDatePickerOptions(),
this.materialDatePickerOptions = const MaterialDatePickerOptions(),
this.materialTimePickerOptions = const MaterialTimePickerOptions(),
this.mode = DateTimeFieldPickerMode.dateAndTime,
this.pickerPlatform = DateTimeFieldPickerPlatform.adaptive,
DateTime? firstDate,
DateTime? lastDate,
DateFormat? dateFormat,
}) : dateFormat = dateFormat ?? mode.toDateFormat(),
firstDate = firstDate ?? kDefaultFirstSelectableDate,
lastDate = lastDate ?? kDefaultLastSelectableDate;