TextFieldState

@Serializable
@ObjCName(name = "TextFieldState", exact = true)
data class TextFieldState(val text: String = "", val selectionStart: Int = 0, val selectionEnd: Int = 0, val userEditCount: Long = 0)

Constructors

Link copied to clipboard
constructor(text: String = "", selectionStart: Int = 0, selectionEnd: Int = 0, userEditCount: Long = 0)

Properties

Link copied to clipboard
val selectionEnd: Int = 0
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns true if other and this are equal ignoring version metadata. Use this to skip no-op user edits.

Link copied to clipboard
fun userEdit(text: String = this.text, selectionStart: Int = this.selectionStart, selectionEnd: Int = this.selectionEnd): TextFieldState

Returns a copy of the state initiated by a user edit.