OudsPasswordInputState
The editable text state of a password input, including the text itself, the position of the cursor or selection, and the password visibility.
To change the password input contents programmatically, call edit, setTextAndSelectAll, setTextAndPlaceCursorAtEnd, or clearText. Individual parts of the state like text, selection, or composition can be read from any snapshot restart scope like Composable functions. To observe these members from outside a restart scope, use snapshotFlow { passwordInputState.text } or snapshotFlow { passwordInputState.selection }.
When instantiating this class from a composable, use rememberOudsPasswordInputState to automatically save and restore the password input state. For more advanced use cases, pass OudsPasswordInputState.Saver to rememberSaveable.
Constructors
Creates an instance of OudsPasswordInputState.
Properties
The current composing range dictated by the IME. If null, there is no composing region.
Indicates if the password is hidden (masked).
The current text content. This value will automatically update when the user enters text or otherwise changes the password input contents. To change it programmatically, call edit.
Functions
Deletes all the text in the state.
Runs block with a mutable version of the current state. The block can make changes to the text and cursor/selection. See the documentation on TextFieldBuffer for a more detailed description of the available operations.
Sets the text in this OudsPasswordInputState to text, replacing any text that was previously there, and places the cursor at the end of the new text.
Sets the text in this OudsPasswordInputState to text, replacing any text that was previously there, and selects all the text.
Creates a temporary, mutable TextFieldBuffer representing the current state of this OudsPasswordInputState.