FTimeField constructor

const FTimeField({
  1. FTimeFieldController? controller,
  2. FTimeFieldStyle style(
    1. FTimeFieldStyle style
    )?,
  3. FTime? initialTime,
  4. bool hour24,
  5. bool autofocus,
  6. FocusNode? focusNode,
  7. FFieldBuilder<FTimeFieldStyle> builder,
  8. FFieldIconBuilder<FTimeFieldStyle>? prefixBuilder,
  9. FFieldIconBuilder<FTimeFieldStyle>? suffixBuilder,
  10. TextInputAction? textInputAction,
  11. TextAlign textAlign,
  12. TextAlignVertical? textAlignVertical,
  13. TextDirection? textDirection,
  14. bool expands,
  15. VoidCallback? onEditingComplete,
  16. ValueChanged<FTime>? onSubmit,
  17. MouseCursor? mouseCursor,
  18. bool canRequestFocus,
  19. Widget? label,
  20. Widget? description,
  21. bool enabled,
  22. ValueChanged<FTime?>? onChange,
  23. FormFieldSetter<FTime>? onSaved,
  24. VoidCallback? onReset,
  25. AutovalidateMode autovalidateMode,
  26. String? forceErrorText,
  27. Widget errorBuilder(
    1. BuildContext context,
    2. String message
    ),
  28. Key? key,
})

Creates a time field that wraps a text input field.

The textInputAction property can be used to specify the action button on the soft keyboard. 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 onEditingComplete callback is called when the user submits the input field, such as by pressing the done button on the keyboard.

The onSubmit callback is called when the user submits a valid time value.

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.

See also:

Implementation

const factory FTimeField({
  FTimeFieldController? controller,
  FTimeFieldStyle Function(FTimeFieldStyle style)? style,
  FTime? initialTime,
  bool hour24,
  bool autofocus,
  FocusNode? focusNode,
  FFieldBuilder<FTimeFieldStyle> builder,
  FFieldIconBuilder<FTimeFieldStyle>? prefixBuilder,
  FFieldIconBuilder<FTimeFieldStyle>? suffixBuilder,
  TextInputAction? textInputAction,
  TextAlign textAlign,
  TextAlignVertical? textAlignVertical,
  TextDirection? textDirection,
  bool expands,
  VoidCallback? onEditingComplete,
  ValueChanged<FTime>? onSubmit,
  MouseCursor? mouseCursor,
  bool canRequestFocus,
  Widget? label,
  Widget? description,
  bool enabled,
  ValueChanged<FTime?>? onChange,
  FormFieldSetter<FTime>? onSaved,
  VoidCallback? onReset,
  AutovalidateMode autovalidateMode,
  String? forceErrorText,
  Widget Function(BuildContext context, String message) errorBuilder,
  Key? key,
}) = _InputTimeField;