Flutter Engine
The Flutter Engine
|
Classes | |
interface | ProcessTextMethodHandler |
Public Member Functions | |
ProcessTextChannel ( @NonNull DartExecutor dartExecutor, @NonNull PackageManager packageManager) | |
void | setMethodHandler (@Nullable ProcessTextMethodHandler processTextMethodHandler) |
Public Attributes | |
final MethodChannel | channel |
final PackageManager | packageManager |
final MethodChannel.MethodCallHandler | parsingMethodHandler |
ProcessTextChannel
is a platform channel that is used by the framework to initiate text processing feature in the embedding and for the embedding to send back the results.
When the framework needs to query the list of text processing actions (for instance to expose them in the selected text context menu), it will send to the embedding the message
. In response, the
ProcessText.queryTextActionsio.flutter.plugin.text.ProcessTextPlugin
will return a map of all activities that can process text. The map keys are generated IDs and the values are the activities labels. On the first request, the io.flutter.plugin.text.ProcessTextPlugin
will make a call to Android's package manager to query all activities that can be performed for the Intent.ACTION_PROCESS_TEXT
intent.
When a text processing action has to be executed, the framework will send to the embedding the message ProcessText.processTextAction
with the int id
of the choosen text action and the String
of text to process as arguments. In response, the io.flutter.plugin.text.ProcessTextPlugin
will make a call to the Android application activity to start the activity exposing the text action. The io.flutter.plugin.text.ProcessTextPlugin
will return the processed text if there is one, or null if the activity did not return a transformed text.
io.flutter.plugin.text.ProcessTextPlugin
implements ProcessTextMethodHandler
that parses incoming messages from Flutter.
Definition at line 40 of file ProcessTextChannel.java.
|
inline |
Definition at line 87 of file ProcessTextChannel.java.
|
inline |
Sets the ProcessTextMethodHandler
which receives all requests to the text processing feature sent through this channel.
Definition at line 98 of file ProcessTextChannel.java.
final MethodChannel io.flutter.embedding.engine.systemchannels.ProcessTextChannel.channel |
Definition at line 46 of file ProcessTextChannel.java.
final PackageManager io.flutter.embedding.engine.systemchannels.ProcessTextChannel.packageManager |
Definition at line 47 of file ProcessTextChannel.java.
final MethodChannel.MethodCallHandler io.flutter.embedding.engine.systemchannels.ProcessTextChannel.parsingMethodHandler |
Definition at line 51 of file ProcessTextChannel.java.