Package io.flutter.embedding.engine.systemchannels

# 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 the `String` locale to spell check with and the `String` of text to spell check as arguments. In response, the `SpellCheckPlugin` 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 the `ArrayList<HashMap<String,Object>>` of spell check results (see `SpellCheckPlugin.onGetSentenceSuggestions(android.view.textservice.SentenceSuggestionsInfo[])` for details). The `SpellCheckPlugin` only handles one request to fetch spell check results at a time; see `SpellCheckPlugin.initiateSpellCheck(java.lang.String, java.lang.String, io.flutter.plugin.common.MethodChannel.Result)` for details.

`SpellCheckPlugin` implements `SpellCheckChannel.SpellCheckMethodHandler` to initiate spell check. Implement `SpellCheckChannel.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
  `final MethodChannel`
  `channel`
  `final MethodChannel.MethodCallHandler`
  `parsingMethodHandler`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SpellCheckChannel(DartExecutor dartExecutor)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `setSpellCheckMethodHandler(SpellCheckChannel.SpellCheckMethodHandler spellCheckMethodHandler)`
  Sets the `SpellCheckChannel.SpellCheckMethodHandler` which receives all requests to spell check the specified text sent through this channel.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### channel

    public final MethodChannel channel

  - ### parsingMethodHandler

    @NonNull public final MethodChannel.MethodCallHandler parsingMethodHandler

- ## Constructor Details

  - ### SpellCheckChannel

    public SpellCheckChannel(@NonNull DartExecutor dartExecutor)

- ## Method Details

  - ### setSpellCheckMethodHandler

    public void setSpellCheckMethodHandler(@Nullable SpellCheckChannel.SpellCheckMethodHandler spellCheckMethodHandler)
    Sets the `SpellCheckChannel.SpellCheckMethodHandler` which receives all requests to spell check the specified text sent through this channel.