MultilineTextField
Outlined text input to get an input value from the user. Which can scroll its content when value takes more place than the available width. We can also set the amount of maximum lines it can expand before overscrolling.
Parameters
the input TextFieldValue to be shown in the text field
the callback that is triggered when the input service updates values in TextFieldValue. An updated TextFieldValue comes as a parameter of the callback
the callback that is triggered when the user try to cancel his input. Most of the times it would require removing the content from The MultilineTextField
a Modifier for this text field
True controls the enabled state of the TextField. When false
, the text field will be neither editable nor focusable, the input of the text field will not be selectable, visually text field will appear in the disabled UI state
controls the editable state of the TextField. When true
, the text field can not be modified, however, a user can focus it and copy text from it. Read-only text fields are usually used to display pre-filled forms that user can not edit
add an asterisk to the label to indicate that this field is required and read it as "label mandatory" but doesn't do anything else so it's up to the developer to handle the behavior.
the optional label to be displayed inside the text field container. The default text style for internal Text is SparkTypography.small when the text field is in focus and SparkTypography.large when the text field is not in focus
the optional placeholder to be displayed when the text field is in focus and the input text is empty. The default text style for internal Text is SparkTypography.large
The optional helper text to be displayed at the bottom outside the text input container that give some informations about expected text
The optional counter to be displayed the the end bottom outside the text input container
the optional leading icon to be displayed at the beginning of the text field container
indicates the validation state of the text field. The label, outline, leading & trailing content are tinted by the state color.
the optional state text to be displayed at the helper position that give more information about the state, it's displayed only when state is not null.
transforms the visual representation of the input value For example, you can use PasswordVisualTransformation to create a password text field. By default no visual transformation is applied
software keyboard options that contains configuration such as KeyboardType and ImeAction
when the input service emits an IME action, the corresponding callback is called. Note that this IME action may be different from what you specified in KeyboardOptions.imeAction
the MutableInteractionSource representing the stream of Interactions for this TextField. You can create and pass in your own remembered MutableInteractionSource if you want to observe Interactions and customize the appearance / behavior of this TextField in different Interactions.
See also
Outlined text input to get an input value from the user. Which can scroll its content when value takes more place than the available width. We can also set the amount of maximum lines it can expand before overscrolling.
Parameters
the input text to be shown in the text field
the callback that is triggered when the input service updates the text. An updated text comes as a parameter of the callback
the callback that is triggered when the user try to cancel his input. Most of the times it would require removing the content from The MultilineTextField
a Modifier for this text field
True controls the enabled state of the TextField. When false
, the text field will be neither editable nor focusable, the input of the text field will not be selectable, visually text field will appear in the disabled UI state
controls the editable state of the TextField. When true
, the text field can not be modified, however, a user can focus it and copy text from it. Read-only text fields are usually used to display pre-filled forms that user can not edit
add an asterisk to the label to indicate that this field is required and read it as "label mandatory" but doesn't do anything else so it's up to the developer to handle the behavior.
the optional label to be displayed inside the text field container. The default text style for internal Text is SparkTypography.small when the text field is in focus and SparkTypography.large when the text field is not in focus
the optional placeholder to be displayed when the text field is in focus and the input text is empty. The default text style for internal Text is SparkTypography.large
The optional helper text to be displayed at the bottom outside the text input container that give some informations about expected text
The optional counter to be displayed the the end bottom outside the text input container
the optional leading icon to be displayed at the beginning of the text field container
indicates the validation state of the text field. The label, outline, leading & trailing content are tinted by the state color.
the optional state text to be displayed at the helper position that give more information about the state, it's displayed only when state is not null.
transforms the visual representation of the input value For example, you can use PasswordVisualTransformation to create a password text field. By default no visual transformation is applied
software keyboard options that contains configuration such as KeyboardType and ImeAction
when the input service emits an IME action, the corresponding callback is called. Note that this IME action may be different from what you specified in KeyboardOptions.imeAction
the MutableInteractionSource representing the stream of Interactions for this TextField. You can create and pass in your own remembered MutableInteractionSource if you want to observe Interactions and customize the appearance / behavior of this TextField in different Interactions.