FDateField.calendar constructor

FDateField.calendar({
  1. FDateSelectionControl<DateTime?>? selectionControl,
  2. FPopoverControl popoverControl,
  3. FTextFieldSizeVariant size,
  4. FDateFieldStyleDelta style,
  5. String format(
    1. BuildContext context,
    2. DateTime value,
    3. DateFormat format
    ),
  6. TextAlign textAlign,
  7. TextAlignVertical? textAlignVertical,
  8. TextDirection? textDirection,
  9. bool expands,
  10. MouseCursor mouseCursor,
  11. bool canRequestFocus,
  12. bool clearable,
  13. String? hint,
  14. bool autofocus,
  15. FocusNode? focusNode,
  16. FDateFieldCalendarProperties calendar,
  17. FFieldBuilder<FDateFieldStyle> builder,
  18. FFieldIconBuilder<FTextFieldStyle>? prefixBuilder,
  19. FFieldIconBuilder<FTextFieldStyle>? suffixBuilder,
  20. Widget? label,
  21. Widget? description,
  22. bool enabled,
  23. FormFieldSetter<DateTime>? onSaved,
  24. VoidCallback? onReset,
  25. AutovalidateMode autovalidateMode,
  26. String? forceErrorText,
  27. FormFieldValidator<DateTime> validator,
  28. Widget errorBuilder(
    1. BuildContext context,
    2. String message
    ),
  29. Key? formFieldKey,
  30. Key? key,
})

Creates a FDateField that allows a date to be selected using only a calendar.

The format customizes the appearance of the date in the input field.

The hint is displayed when the input field is empty. Defaults to the current locale's FLocalizations.dateFieldHint.

The textAlign property is used to specify the alignment of the text within the input field.

The textAlignVertical property is used to specify the vertical alignment of the text and can be useful when used with a prefix or suffix.

The textDirection property can be used to specify the directionality of the text input.

If expands is true, the input field will expand to fill its parent's height.

The mouseCursor can be used to specify the cursor shown when hovering over the input field.

If canRequestFocus is false, the input field cannot obtain focus but can still be selected.

If clearable is true, the input field will show a clear button when a date is selected. Defaults to false.

The calendar is used to customize the calendar mode, its appearance and behavior.

See also:

  • FDateField - Creates a date field with both input field and calendar.
  • FDateField.input - Creates a date field with only an input field.

Implementation

factory FDateField.calendar({
  FDateSelectionControl<DateTime?>? selectionControl,
  FPopoverControl popoverControl,
  FTextFieldSizeVariant size,
  FDateFieldStyleDelta style,
  String Function(BuildContext context, DateTime value, DateFormat format) format,
  TextAlign textAlign,
  TextAlignVertical? textAlignVertical,
  TextDirection? textDirection,
  bool expands,
  MouseCursor mouseCursor,
  bool canRequestFocus,
  bool clearable,
  String? hint,
  bool autofocus,
  FocusNode? focusNode,
  FDateFieldCalendarProperties calendar,
  FFieldBuilder<FDateFieldStyle> builder,
  FFieldIconBuilder<FTextFieldStyle>? prefixBuilder,
  FFieldIconBuilder<FTextFieldStyle>? suffixBuilder,
  Widget? label,
  Widget? description,
  bool enabled,
  FormFieldSetter<DateTime>? onSaved,
  VoidCallback? onReset,
  AutovalidateMode autovalidateMode,
  String? forceErrorText,
  FormFieldValidator<DateTime> validator,
  Widget Function(BuildContext context, String message) errorBuilder,
  Key? formFieldKey,
  Key? key,
}) = _CalendarDateField;