FTimeField.picker constructor

const FTimeField.picker({
  1. FTimeFieldController? controller,
  2. FTimeFieldStyle style(
    1. FTimeFieldStyle
    )?,
  3. FTime? initialTime,
  4. bool hour24,
  5. DateFormat? format,
  6. TextAlign textAlign,
  7. TextAlignVertical? textAlignVertical,
  8. TextDirection? textDirection,
  9. bool expands,
  10. MouseCursor mouseCursor,
  11. bool canRequestFocus,
  12. String? hint,
  13. bool autofocus,
  14. FocusNode? focusNode,
  15. Alignment anchor,
  16. Alignment inputAnchor,
  17. FPortalSpacing spacing,
  18. Offset shift(
    1. Size,
    2. FPortalChildBox,
    3. FPortalBox
    ),
  19. Offset offset,
  20. FPopoverHideRegion hideRegion,
  21. VoidCallback? onTapHide,
  22. int hourInterval,
  23. int minuteInterval,
  24. FFieldBuilder<FTimeFieldStyle> builder,
  25. FFieldIconBuilder<FTimeFieldStyle>? prefixBuilder,
  26. FFieldIconBuilder<FTimeFieldStyle>? suffixBuilder,
  27. Widget? label,
  28. Widget? description,
  29. bool enabled,
  30. ValueChanged<FTime?>? onChange,
  31. FormFieldSetter<FTime>? onSaved,
  32. AutovalidateMode autovalidateMode,
  33. String? forceErrorText,
  34. Widget errorBuilder(
    1. BuildContext,
    2. String
    ),
  35. Key? key,
})

Creates a FTimeField that allows a time to be selected using only a picker.

The format customizes the appearance of the time in the input field. Defaults to the DateFormat.Hm if hour24 is true or DateFormat.jm if false.

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

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.

The anchor and inputAnchor control the alignment points for the picker popover positioning. Defaults to Alignment.topLeft and Alignment.bottomLeft respectively.

The spacing property controls the spacing between the input field and the picker popover. Defaults to FPortalSpacing(4).

The shift function controls how the picker repositions when space is constrained. Defaults to FPortalShift.flip.

The offset property controls the offset of the picker popover. Defaults to Offset.zero.

hideRegion controls the region that can be tapped to hide the popover. Defaults to FPopoverHideRegion.anywhere.

hourInterval and minuteInterval control the increment/decrement interval of the hour and minute respectively. Default to 1.

See also:

Implementation

const factory FTimeField.picker({
  FTimeFieldController? controller,
  FTimeFieldStyle Function(FTimeFieldStyle)? style,
  FTime? initialTime,
  bool hour24,
  DateFormat? format,
  TextAlign textAlign,
  TextAlignVertical? textAlignVertical,
  TextDirection? textDirection,
  bool expands,
  MouseCursor mouseCursor,
  bool canRequestFocus,
  String? hint,
  bool autofocus,
  FocusNode? focusNode,
  Alignment anchor,
  Alignment inputAnchor,
  FPortalSpacing spacing,
  Offset Function(Size, FPortalChildBox, FPortalBox) shift,
  Offset offset,
  FPopoverHideRegion hideRegion,
  VoidCallback? onTapHide,
  int hourInterval,
  int minuteInterval,
  FFieldBuilder<FTimeFieldStyle> builder,
  FFieldIconBuilder<FTimeFieldStyle>? prefixBuilder,
  FFieldIconBuilder<FTimeFieldStyle>? suffixBuilder,
  Widget? label,
  Widget? description,
  bool enabled,
  ValueChanged<FTime?>? onChange,
  FormFieldSetter<FTime>? onSaved,
  AutovalidateMode autovalidateMode,
  String? forceErrorText,
  Widget Function(BuildContext, String) errorBuilder,
  Key? key,
}) = _PickerTimeField;