5package io.flutter.embedding.engine.systemchannels;
7import androidx.annotation.NonNull;
8import androidx.annotation.Nullable;
10import io.flutter.embedding.engine.dart.DartExecutor;
11import io.flutter.plugin.common.MethodCall;
12import io.flutter.plugin.common.MethodChannel;
13import io.flutter.plugin.common.StandardMethodCodec;
14import java.util.ArrayList;
38 private static final String TAG =
"SpellCheckChannel";
48 if (spellCheckMethodHandler ==
null) {
51 "No SpellCheckeMethodHandler registered, call not forwarded to spell check API.");
54 String method =
call.method;
56 Log.
v(
TAG,
"Received '" + method +
"' message.");
58 case "SpellCheck.initiateSpellCheck":
60 final ArrayList<String> argumentList = (ArrayList<String>)
args;
61 String locale = argumentList.get(0);
62 String
text = argumentList.get(1);
64 }
catch (IllegalStateException exception) {
65 result.error(
"error", exception.getMessage(),
null);
86 this.spellCheckMethodHandler = spellCheckMethodHandler;
static void v(@NonNull String tag, @NonNull String message)
SpellCheckChannel(@NonNull DartExecutor dartExecutor)
void setSpellCheckMethodHandler( @Nullable SpellCheckMethodHandler spellCheckMethodHandler)
final MethodChannel.MethodCallHandler parsingMethodHandler
final MethodChannel channel
void setMethodCallHandler(final @Nullable MethodCallHandler handler)
static final StandardMethodCodec INSTANCE
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
void initiateSpellCheck( @NonNull String locale, @NonNull String text, @NonNull MethodChannel.Result result)