FTimeField.picker constructor

const FTimeField.picker({
  1. FTimeFieldControl control,
  2. FPopoverControl popoverControl,
  3. FTimeFieldStyle style(
    1. FTimeFieldStyle style
    )?,
  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 fieldAnchor,
  17. FPortalConstraints constraints,
  18. FPortalSpacing spacing,
  19. FPortalOverflow overflow,
  20. Offset offset,
  21. FPopoverHideRegion hideRegion,
  22. Object? groupId,
  23. VoidCallback? onTapHide,
  24. int hourInterval,
  25. int minuteInterval,
  26. FFieldBuilder<FTimeFieldStyle> builder,
  27. FFieldIconBuilder<FTimeFieldStyle>? prefixBuilder,
  28. FFieldIconBuilder<FTimeFieldStyle>? suffixBuilder,
  29. Widget? label,
  30. Widget? description,
  31. bool enabled,
  32. FormFieldSetter<FTime>? onSaved,
  33. VoidCallback? onReset,
  34. AutovalidateMode autovalidateMode,
  35. String? forceErrorText,
  36. Widget errorBuilder(
    1. BuildContext context,
    2. String message
    ),
  37. 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 fieldAnchor control the alignment points for the picker popover positioning. Defaults to Alignment.topLeft and Alignment.bottomLeft respectively.

The constraints property controls the constraints of the picker popover. Defaults to const FPortalConstraints(maxWidth: 200, maxHeight: 200).

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

The overflow function controls how the picker repositions when space is constrained. Defaults to FPortalOverflow.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.

The groupId is used to group popovers together so that only one popover in the group can be shown at a time.

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

See also:

Implementation

const factory FTimeField.picker({
  FTimeFieldControl control,
  FPopoverControl popoverControl,
  FTimeFieldStyle Function(FTimeFieldStyle style)? style,
  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 fieldAnchor,
  FPortalConstraints constraints,
  FPortalSpacing spacing,
  FPortalOverflow overflow,
  Offset offset,
  FPopoverHideRegion hideRegion,
  Object? groupId,
  VoidCallback? onTapHide,
  int hourInterval,
  int minuteInterval,
  FFieldBuilder<FTimeFieldStyle> builder,
  FFieldIconBuilder<FTimeFieldStyle>? prefixBuilder,
  FFieldIconBuilder<FTimeFieldStyle>? suffixBuilder,
  Widget? label,
  Widget? description,
  bool enabled,
  FormFieldSetter<FTime>? onSaved,
  VoidCallback? onReset,
  AutovalidateMode autovalidateMode,
  String? forceErrorText,
  Widget Function(BuildContext context, String message) errorBuilder,
  Key? key,
}) = _PickerTimeField;