FTimeField.picker constructor
- FTimeFieldController? controller,
- 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 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 errorBuilder(),
- 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:
- FTimeField.new - Creates a time field with only an input field.
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;