DateTimeField.time constructor

DateTimeField.time({
  1. Key? key,
  2. required ValueChanged<DateTime?>? onChanged,
  3. DateTime? value,
  4. InputDecoration? decoration,
  5. DateTime? firstDate,
  6. DateTime? lastDate,
  7. DateTime? initialPickerDateTime,
  8. TextStyle? style,
  9. CupertinoDatePickerOptions cupertinoDatePickerOptions = const CupertinoDatePickerOptions(),
  10. MaterialTimePickerOptions materialTimePickerOptions = const MaterialTimePickerOptions(),
  11. bool autofocus = false,
  12. DateFormat? dateFormat,
  13. EdgeInsetsGeometry? padding,
  14. VoidCallback? onTap,
  15. FocusNode? focusNode,
  16. bool hideDefaultSuffixIcon = false,
  17. bool? enableFeedback,
  18. DateTimeFieldPickerPlatform pickerPlatform = DateTimeFieldPickerPlatform.adaptive,
})

Implementation

factory DateTimeField.time({
  Key? key,
  required ValueChanged<DateTime?>? onChanged,
  DateTime? value,
  InputDecoration? decoration,
  DateTime? firstDate,
  DateTime? lastDate,
  DateTime? initialPickerDateTime,
  TextStyle? style,
  CupertinoDatePickerOptions cupertinoDatePickerOptions =
      const CupertinoDatePickerOptions(),
  MaterialTimePickerOptions materialTimePickerOptions =
      const MaterialTimePickerOptions(),
  bool autofocus = false,
  DateFormat? dateFormat,
  EdgeInsetsGeometry? padding,
  VoidCallback? onTap,
  FocusNode? focusNode,
  bool hideDefaultSuffixIcon = false,
  bool? enableFeedback,
  DateTimeFieldPickerPlatform pickerPlatform =
      DateTimeFieldPickerPlatform.adaptive,
}) =>
    DateTimeField(
      key: key,
      mode: DateTimeFieldPickerMode.time,
      firstDate: firstDate ?? DateTime(2000),
      lastDate: lastDate ?? DateTime(2001),
      onChanged: onChanged,
      value: value,
      decoration: decoration,
      initialPickerDateTime: initialPickerDateTime,
      style: style,
      autofocus: autofocus,
      dateFormat: dateFormat,
      padding: padding,
      onTap: onTap,
      focusNode: focusNode,
      hideDefaultSuffixIcon: hideDefaultSuffixIcon,
      enableFeedback: enableFeedback,
      cupertinoDatePickerOptions: cupertinoDatePickerOptions,
      materialTimePickerOptions: materialTimePickerOptions,
      pickerPlatform: pickerPlatform,
    );