TextInputConnection class

An interface for interacting with a text input control.

See also:


attached bool
Whether this connection is currently interacting with the text input control.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scribbleInProgress bool
Whether there is currently a Scribble interaction in progress.
no setter


close() → void
Stop interacting with the text input control.
connectionClosedReceived() → void
Platform sent a notification informing the connection is closed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
requestAutofill() → void
Requests the system autofill UI to appear.
setCaretRect(Rect rect) → void
Sends the coordinates of caret rect. This is used on macOS for positioning the accent selection menu.
setComposingRect(Rect rect) → void
Send the smallest rect that covers the text in the client that's currently being composed.
setEditableSizeAndTransform(Size editableBoxSize, Matrix4 transform) → void
Send the size and transform of the editable text to engine.
setEditingState(TextEditingValue value) → void
Requests that the text input control change its internal state to match the given state.
setSelectionRects(List<SelectionRect> selectionRects) → void
Send the bounding boxes of the current selected glyphs in the client to the platform's text input plugin.
setStyle({required String? fontFamily, required double? fontSize, required FontWeight? fontWeight, required TextDirection textDirection, required TextAlign textAlign}) → void
Send text styling information.
show() → void
Requests that the text input control become visible.
toString() String
A string representation of this object.
updateConfig(TextInputConfiguration configuration) → void
Requests that the text input control update itself according to the new TextInputConfiguration.


operator ==(Object other) bool
The equality operator.

Static Methods

debugResetId({int to = 1}) → void
Resets the internal ID counter for testing purposes.