insertTextAtCursor

Function

Common
fun SemanticsPropertyReceiver.insertTextAtCursor(
    label: String? = null,
    action: ((AnnotatedString) -> Boolean)?,
)

Action to insert text into this node at the current cursor position, or replacing the selection if text is selected.

Expected to be used on editable text fields.

Parameters

labelOptional label for this action.
actionAction to be performed when SemanticsActions.InsertTextAtCursor is called.