DefaultProcessTextService class

The service used by default for the text processing feature.

Any widget may use this service to get a list of text processing actions and send requests to activate these text actions.

This is currently only supported on Android and it requires adding the following '' element to the Android manifest file:

<manifest ...> <application ...> ... <!-- Required to query activities that can process text, see: https://developer.android.com/training/package-visibility and https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.

     In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
    <intent>
        <action android:name="android.intent.action.PROCESS_TEXT"/>
        <data android:mimeType="text/plain"/>
    </intent>
</queries>

The '' element is part of the Android manifest file generated when running the 'flutter create' command.

If the '' element is not found, queryTextActions() will return an empty list of ProcessTextAction.

See also:

Implemented types

Constructors

DefaultProcessTextService()
Creates the default service to interact with the platform text processing feature via communication over the text processing MethodChannel.

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processTextAction(String id, String text, bool readOnly) Future<String?>
On Android, the readOnly parameter might be used by the targeted activity, see: https://developer.android.com/reference/android/content/Intent#EXTRA_PROCESS_TEXT_READONLY.
override
queryTextActions() Future<List<ProcessTextAction>>
Returns a Future that resolves to a List of ProcessTextActions containing all text processing actions available.
override
setChannel(MethodChannel newChannel) → void
Set the MethodChannel used to communicate with the engine text processing feature.
toString() String
A string representation of this object.
inherited

Operators

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