FTimeField.picker constructor
- FTimeFieldControl control,
- FPopoverControl popoverControl,
- FTextFieldSizeVariant size,
- FTimeFieldStyleDelta 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,
- bool useViewPadding,
- bool useViewInsets,
- Offset offset,
- FPopoverHideRegion hideRegion,
- Object? groupId,
- VoidCallback? onTapHide,
- bool cutout,
- void cutoutBuilder(),
- FTimeFieldPopoverBuilder popoverBuilder,
- int hourInterval,
- int minuteInterval,
- FFieldBuilder<
FTimeFieldStyle> builder, - FFieldIconBuilder<
FTextFieldStyle> ? prefixBuilder, - FFieldIconBuilder<
FTextFieldStyle> ? suffixBuilder, - bool clearable,
- Widget? label,
- Widget? description,
- bool enabled,
- FormFieldSetter<
FTime> ? onSaved, - VoidCallback? onReset,
- AutovalidateMode autovalidateMode,
- String? forceErrorText,
- Widget errorBuilder(
- BuildContext context,
- String message
- Key? formFieldKey,
- 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.
If clearable is true, the input field will show a clear button when a time is selected. Defaults to false.
See also:
- FTimeField.new - Creates a time field with only an input field.
Implementation
const factory FTimeField.picker({
FTimeFieldControl control,
FPopoverControl popoverControl,
FTextFieldSizeVariant size,
FTimeFieldStyleDelta 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,
bool useViewPadding,
bool useViewInsets,
Offset offset,
FPopoverHideRegion hideRegion,
Object? groupId,
VoidCallback? onTapHide,
bool cutout,
void Function(Path path, Rect bounds) cutoutBuilder,
FTimeFieldPopoverBuilder popoverBuilder,
int hourInterval,
int minuteInterval,
FFieldBuilder<FTimeFieldStyle> builder,
FFieldIconBuilder<FTextFieldStyle>? prefixBuilder,
FFieldIconBuilder<FTextFieldStyle>? suffixBuilder,
bool clearable,
Widget? label,
Widget? description,
bool enabled,
FormFieldSetter<FTime>? onSaved,
VoidCallback? onReset,
AutovalidateMode autovalidateMode,
String? forceErrorText,
Widget Function(BuildContext context, String message) errorBuilder,
Key? formFieldKey,
Key? key,
}) = _PickerTimeField;