InputTextField

constructor(text: String? = null, type: InputTextFieldType = InputTextFieldType.DEFAULT, changeListener: (String?) -> Unit? = null, validationListener: (String?) -> ValidationResult? = null, resultListener: (String?) -> Unit? = null, textStyle: TextStyle? = null, visualTransformation: VisualTransformation = VisualTransformation.None, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, keyboardActions: KeyboardActions = KeyboardActions.Default, singleLine: Boolean = false, maxLines: Int = Int.MAX_VALUE, shape: Shape? = null, colors: TextFieldColors? = null, key: String? = null, required: Boolean = false, header: InputHeader? = null, columns: Int? = null)

Parameters

text

The input text to be shown in the text field

type

The style of the text field.

changeListener

The listener that returns the changed value.

validationListener

The listener that is invoked to check if the value is valid.

resultListener

The listener that returns the final value.

textStyle

the style to be applied to the input text. Defaults to LocalTextStyle.

visualTransformation

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.

keyboardOptions

Software keyboard options that contains configuration such as KeyboardType and ImeAction

keyboardActions

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

singleLine

When true, this text field becomes a single horizontally scrolling text field instead of wrapping onto multiple lines. The keyboard will be informed to not show the return key as the ImeAction. Note that maxLines parameter will be ignored as the maxLines attribute will be automatically set to 1.

maxLines

The maximum height in terms of maximum number of visible lines. Should be equal or greater than 1. Note that this parameter will be ignored and instead maxLines will be set to 1 if singleLine is set to true.

shape

Defines the shape of this text field's border.

colors

TextFieldColors that will be used to resolve the colors used for this text field in different states.

key

The key of the input that is used for saving the data in the result bundle. (Alternatively the index of the input is used.)

required

If the input is required to finish the dialog.

header

The additional InputHeader to add more context information to the selection.

columns

The columns that this input spans.