HTextField

Class
A highly customizable text field widget that can be used for text input.

Fields

autocorrect: bool
enabled: bool
focusKey: Key
hideMobileInput: bool
initialValue: string
isDelayed: bool
isPasswordField: bool
isReadOnly: bool
maskChar: char
maxLength: int
multiline: bool
onChanged: Action<string>
onSubmitted: Action<string>

Constructors

HTextField(controller: TextEditingController, focusKey: Key, style: HTextFieldStyle, multiline: bool, autocorrect: bool, isReadOnly: bool, isPasswordField: bool, isDelayed: bool, hideMobileInput: bool, keyboardType: TouchScreenKeyboardType, maskChar: char, maxLength: int, enabled: bool, initialValue: string, onChanged: Action<string>, onSubmitted: Action<string>, key: Key, constants: object[], modifiers: IReadOnlyCollection<Modifier>)
Creates a highly customizable text field widget that can be used for text input.

Parameters

controller:TextEditingController - The controller used to manage the field's value and WidgetState. If not specified, a controller will be created and managed by the field's state.
focusKey:Key - The key that will be used by the interactive element of the field. Can be used for focus management using GlobalKey.
style:HTextFieldStyle - A predefined style to change the visual appearance of the text field. If not specified, the current PrimitiveTheme.TextField theme will be used.
multiline:bool - Whether the text field should allow multiple lines of text.
autocorrect:bool - Whether the text field should automatically correct the user's input.
isReadOnly:bool - Whether the text field should be read-only.
isPasswordField:bool - Whether the text field should obscure the user's input.
isDelayed:bool - Delays updates to the text field's value until the user pressed enter or the element lost focus.
hideMobileInput:bool - Whether to hide the os's keyboard on mobile devices.
keyboardType:TouchScreenKeyboardType - The type of keyboard type to use for mobile input.
maskChar:char - The character to use for masking the input.
maxLength:int - The maximum number of characters allowed in the input.
enabled:bool - Sets WidgetState.Disabled if no controller is specified.
initialValue:string - Sets the initial value if no controller is specified.
onChanged:Action<string> - Sets TextEditingController.onChanged action if no controller is specified.
onSubmitted:Action<string> - Sets TextEditingController.onSubmitted action if no controller is specified.
key:Key - Passed on to Widget.key.
constants:object[] - Passed on to Widget.constants.
modifiers:IReadOnlyCollection<Modifier> - Passed on to Widget.modifiers.

Methods

CreateState(): State<HTextField>

Inherited Members

Extension Methods

ToDiagnosticsNodeSafeIfClipConstDisplayExpandFillFlexibleMarginOpacityPaddingPositionedShrinkSizeStretchTightStretchTightVisibilityWithModifierToBuildableToFactoryDescribeIdentityShortHashToStringNullable

On this page