TestTextInput class

A testing stub for the system's onscreen keyboard.

Typical app tests will not need to use this class directly.

See also:

Constructors

TestTextInput({VoidCallback onCleared })
Create a fake keyboard backend. [...]

Properties

editingState Map<String, dynamic>
The last set of arguments that TextInputConnection.setEditingState sent to the embedder. [...]
read / write
isRegistered bool
Whether this TestTextInput is registered with SystemChannels.textInput. [...]
read-only
isVisible bool
Whether the onscreen keyboard is visible to the user.
read-only
onCleared VoidCallback
Called when the keyboard goes away. [...]
final
setClientArgs Map<String, dynamic>
Arguments supplied to the TextInput.setClient method call.
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

enterText(String text) → void
Simulates the user typing the given text.
hide() → void
Simulates the user hiding the onscreen keyboard.
receiveAction(TextInputAction action) Future<void>
Simulates the user pressing one of the TextInputAction buttons. Does not check that the TextInputAction performed is an acceptable one based on the inputAction setClientArgs.
register() → void
Installs this object as a mock handler for SystemChannels.textInput.
unregister() → void
Removes this object as a mock handler for SystemChannels.textInput. [...]
updateEditingValue(TextEditingValue value) → void
Simulates the user changing the TextEditingValue to the given value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited