TextFieldState

class TextFieldState(initialValue: String = "", val maxLength: Int = 32)(source)

Owner-thread mutable value for one single-line text field.

The state accepts printable ASCII U+0020 through U+007E, owns its value, and permits at most one live retained observer. Reads, writes, observation, and subscription release are confined to the thread that constructs the state.

Parameters

initialValue

initial printable-ASCII value.

Throws

when maxLength is not positive or initialValue is unsupported or too long.

Constructors

Link copied to clipboard
constructor(initialValue: String = "", maxLength: Int = 32)

Properties

Link copied to clipboard

positive maximum UTF-16 length accepted by value.

Link copied to clipboard

Current printable-ASCII value.

Functions

Link copied to clipboard
fun observe(callback: (String) -> Unit): AutoCloseable

Installs the sole retained observer used by a runtime text-field node.