DateTimeField.time constructor

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

Implementation

factory DateTimeField.time({
  Key? key,
  required ValueChanged<DateTime?>? onChanged,
  DateTime? value,
  bool? enabled,
  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, 1, 1, 0, 0),
      lastDate: lastDate ?? DateTime(2000, 1, 1, 23, 59),
      onChanged: onChanged,
      value: value,
      decoration: decoration,
      initialPickerDateTime: initialPickerDateTime,
      style: style,
      autofocus: autofocus,
      enabled: enabled,
      dateFormat: dateFormat,
      padding: padding,
      onTap: onTap,
      focusNode: focusNode,
      hideDefaultSuffixIcon: hideDefaultSuffixIcon,
      enableFeedback: enableFeedback,
      cupertinoDatePickerOptions: cupertinoDatePickerOptions,
      materialTimePickerOptions: materialTimePickerOptions,
      pickerPlatform: pickerPlatform,
    );