TextInputControl mixin

An interface for implementing text input controls that receive text editing state changes and visual input control requests.

Editing state changes and input control requests are sent by the framework when the editing state of the attached text input client changes, or it requests the input control to be shown or hidden, for example.

The input control can be installed with TextInput.setInputControl, and the default platform text input control can be restored with TextInput.restorePlatformInputControl.

The TextInputControl class must be extended. TextInputControl implementations should call TextInput.updateEditingValue to send user input to the attached input client.

This example illustrates a basic TextInputControl implementation.
link

To create a local project with this code sample, run:
flutter create --sample=services.TextInputControl.1 mysample

See also:

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

attach(TextInputClient client, TextInputConfiguration configuration) → void
Requests the text input control to attach to the given input client.
detach(TextInputClient client) → void
Requests the text input control to detach from the given input client.
finishAutofillContext({bool shouldSave = true}) → void
Requests that the autofill context is finalized.
hide() → void
Requests that the text input control is hidden.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestAutofill() → void
Requests autofill from the text input control.
setCaretRect(Rect rect) → void
Informs the text input control about caret area changes.
setComposingRect(Rect rect) → void
Informs the text input control about composing area changes.
setEditableSizeAndTransform(Size editableBoxSize, Matrix4 transform) → void
Informs the text input control about client position changes.
setEditingState(TextEditingValue value) → void
Informs the text input control about editing state changes.
setSelectionRects(List<SelectionRect> selectionRects) → void
Informs the text input control about selection area changes.
setStyle({required String? fontFamily, required double? fontSize, required FontWeight? fontWeight, required TextDirection textDirection, required TextAlign textAlign}) → void
Informs the text input control about text style changes.
show() → void
Requests that the text input control is shown.
toString() String
A string representation of this object.
inherited
updateConfig(TextInputConfiguration configuration) → void
Informs the text input control about input configuration changes.

Operators

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