Class SpellCheckChannel
- java.lang.Object
-
- io.flutter.embedding.engine.systemchannels.SpellCheckChannel
-
public class SpellCheckChannel extends Object
SpellCheckChannel
is a platform channel that is used by the framework to initiate spell check in the embedding and for the embedding to send back the results.When there is new text to be spell checked, the framework will send to the embedding the message
SpellCheck.initiateSpellCheck
with theString
locale to spell check with and theString
of text to spell check as arguments. In response, theSpellCheckPlugin
will make a call to Android's spell check service to fetch spell check results for the specified text.Once the spell check results are received by the
SpellCheckPlugin
, it will send back to the framework theArrayList<HashMap<String,Object>>
of spell check results (seeSpellCheckPlugin.onGetSentenceSuggestions(android.view.textservice.SentenceSuggestionsInfo[])
for details). TheSpellCheckPlugin
only handles one request to fetch spell check results at a time; seeSpellCheckPlugin.initiateSpellCheck(java.lang.String, java.lang.String, io.flutter.plugin.common.MethodChannel.Result)
for details.SpellCheckPlugin
implementsSpellCheckChannel.SpellCheckMethodHandler
to initiate spell check. ImplementSpellCheckChannel.SpellCheckMethodHandler
to respond to spell check requests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SpellCheckChannel.SpellCheckMethodHandler
-
Field Summary
Fields Modifier and Type Field Description MethodChannel
channel
MethodChannel.MethodCallHandler
parsingMethodHandler
-
Constructor Summary
Constructors Constructor Description SpellCheckChannel(DartExecutor dartExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setSpellCheckMethodHandler(SpellCheckChannel.SpellCheckMethodHandler spellCheckMethodHandler)
Sets theSpellCheckChannel.SpellCheckMethodHandler
which receives all requests to spell check the specified text sent through this channel.
-
-
-
Field Detail
-
channel
public final MethodChannel channel
-
parsingMethodHandler
@NonNull public final MethodChannel.MethodCallHandler parsingMethodHandler
-
-
Constructor Detail
-
SpellCheckChannel
public SpellCheckChannel(@NonNull DartExecutor dartExecutor)
-
-
Method Detail
-
setSpellCheckMethodHandler
public void setSpellCheckMethodHandler(@Nullable SpellCheckChannel.SpellCheckMethodHandler spellCheckMethodHandler)
Sets theSpellCheckChannel.SpellCheckMethodHandler
which receives all requests to spell check the specified text sent through this channel.
-
-