Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Add Spell Check Support for Android Engine #30858

Merged
merged 72 commits into from
May 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
dc93719
Add session management
camsim99 Jan 10, 2022
cd234ad
Handle receiving results
camsim99 Jan 10, 2022
f463846
Add framework logic, modify engine
camsim99 Jan 12, 2022
3dfae0a
Make engine build
camsim99 Jan 12, 2022
546692b
Add retrieving locale
camsim99 Jan 13, 2022
5f43ff5
Added comments for experimentation
camsim99 Jan 18, 2022
ee73219
Send string back temporarily, fix results representation
camsim99 Feb 2, 2022
624f68b
Formatting
camsim99 Feb 2, 2022
846b195
Merge branch 'main' of github.com:flutter/engine into issue_34688_dev
camsim99 Feb 28, 2022
b27704c
Merge remote-tracking branch 'upstream/main' into issue_34688_dev
camsim99 Mar 16, 2022
64f0ac7
Add new method channel
camsim99 Mar 18, 2022
0cc3776
Add platform setting for spell check
camsim99 Mar 18, 2022
33f2f40
Change method channel name
camsim99 Mar 21, 2022
eb3c731
Remove print statements
camsim99 Mar 22, 2022
1877242
Clean up
camsim99 Mar 23, 2022
5372aaa
Formatting
camsim99 Mar 24, 2022
d9adbdc
Clean PR
camsim99 Mar 28, 2022
34809db
Undo platform plugin changes
camsim99 Mar 28, 2022
10d154d
Clean up code
camsim99 Mar 30, 2022
00c228e
Begin adding tests
camsim99 Mar 30, 2022
e08171f
Formatting
camsim99 Mar 30, 2022
5ccc144
Correct sessions, remove unecessary line
camsim99 Mar 31, 2022
87ab60f
Add tests
camsim99 Mar 31, 2022
f4083d7
Formatting
camsim99 Mar 31, 2022
ce45427
Remove variable
camsim99 Mar 31, 2022
6972b0b
Begin fixing tests
camsim99 Apr 1, 2022
3eba4de
Address reviews
camsim99 Apr 7, 2022
963d9ae
Start fixing systesm setting
camsim99 Apr 8, 2022
6ea2ede
Continue addressing reviews
camsim99 Apr 8, 2022
32c7702
Continue addressing reviews
camsim99 Apr 8, 2022
e9ebd5b
Fix spell checkers check
camsim99 Apr 8, 2022
8298436
Begin fixing tests
camsim99 Apr 9, 2022
993b6c8
Reformat FlutterViewTest
camsim99 Apr 11, 2022
4179f42
Fixing tests
camsim99 Apr 11, 2022
f999488
Merge remote-tracking branch 'upstream/main' into issue_34688_dev
camsim99 Apr 11, 2022
ade72bc
Fix tests minus log errors
camsim99 Apr 11, 2022
c20b62c
Add context shadow to stub tsm request
camsim99 Apr 13, 2022
49583d4
Formatting
camsim99 Apr 13, 2022
49939aa
Fix np error
camsim99 Apr 14, 2022
0cf00f3
Add license
camsim99 Apr 14, 2022
48a4354
Update licenses file
camsim99 Apr 14, 2022
510f83a
Add nativeSpellCheckServiceDefined to other platform dispatchers
camsim99 Apr 15, 2022
d8e333b
Merge remote-tracking branch 'upstream/main' into issue_34688_dev
camsim99 Apr 15, 2022
61908d3
Remove setting
camsim99 Apr 15, 2022
29b095f
Fix typos
camsim99 Apr 15, 2022
ee28058
Update lib/ui/platform_dispatcher.dart
camsim99 Apr 18, 2022
4f0a074
Update lib/ui/window.dart
camsim99 Apr 18, 2022
6c4d437
Update shell/platform/android/io/flutter/embedding/android/FlutterVie…
camsim99 Apr 18, 2022
d73b915
Update shell/platform/android/io/flutter/embedding/engine/systemchann…
camsim99 Apr 18, 2022
66c24ed
Update shell/platform/android/io/flutter/embedding/engine/systemchann…
camsim99 Apr 18, 2022
04a2ce1
Update shell/platform/android/io/flutter/embedding/engine/systemchann…
camsim99 Apr 18, 2022
15d17f5
Update shell/platform/android/io/flutter/embedding/engine/systemchann…
camsim99 Apr 18, 2022
e6414b2
Update shell/platform/android/io/flutter/embedding/engine/systemchann…
camsim99 Apr 18, 2022
2882e3b
Update shell/platform/android/io/flutter/embedding/engine/systemchann…
camsim99 Apr 18, 2022
dfe4689
Update shell/platform/android/io/flutter/plugin/editing/SpellCheckPlu…
camsim99 Apr 18, 2022
cdc6b9c
Update shell/platform/android/io/flutter/plugin/editing/SpellCheckPlu…
camsim99 Apr 18, 2022
65b8850
Update shell/platform/android/io/flutter/plugin/editing/SpellCheckPlu…
camsim99 Apr 18, 2022
036b15b
Make review fixes
camsim99 Apr 18, 2022
188c2ad
Merge branch 'issue_34688_dev' of github.com:camsim99/engine into iss…
camsim99 Apr 18, 2022
8198d4e
Formatting
camsim99 Apr 18, 2022
a2b6c90
Fix spell check test
camsim99 Apr 18, 2022
2aac372
Address nits
camsim99 Apr 21, 2022
894f4e9
Send text to framework
camsim99 Apr 28, 2022
2a4ea66
Push for visibility
camsim99 May 4, 2022
c2a6550
Modify result response protocol
camsim99 May 6, 2022
6125e74
Merge branch 'main' into issue_34688_dev
camsim99 May 9, 2022
74d1477
Merge remote-tracking branch 'upstream/master' into issue_34688_dev
camsim99 May 10, 2022
cc8bf5e
Merge branch 'issue_34688_dev' of github.com:camsim99/engine into iss…
camsim99 May 10, 2022
5a175ec
Formatting and pull
camsim99 May 10, 2022
1c02784
Merge remote-tracking branch 'upstream/master' into issue_34688_dev
camsim99 May 12, 2022
3e74d61
Emulator fix
camsim99 May 13, 2022
975673c
Merge remote-tracking branch 'upstream/main' into issue_34688_dev
camsim99 May 13, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,7 @@ FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/system
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/RestorationChannel.java
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SettingsChannel.java
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SpellCheckChannel.java
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SystemChannel.java
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java
FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/common/ActivityLifecycleListener.java
Expand All @@ -1423,6 +1424,7 @@ FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/editing/FlutterT
FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/editing/ImeSyncDeferringInsetsCallback.java
FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/editing/InputConnectionAdaptor.java
FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/editing/ListenableEditingState.java
FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/editing/SpellCheckPlugin.java
FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/editing/TextEditingDelta.java
FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java
FILE: ../../../flutter/shell/platform/android/io/flutter/plugin/localization/LocalizationPlugin.java
Expand Down
14 changes: 14 additions & 0 deletions lib/ui/platform_dispatcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,14 @@ class PlatformDispatcher {
_onTextScaleFactorChangedZone = Zone.current;
}

/// Whether the spell check service is supported on the current platform.
///
/// This option is used by [EditableTextState] to define its
/// [SpellCheckConfiguration] when a default spell check service
/// is requested.
bool get nativeSpellCheckServiceDefined => _nativeSpellCheckServiceDefined;
bool _nativeSpellCheckServiceDefined = false;

/// Whether briefly displaying the characters as you type in obscured text
/// fields is enabled in system settings.
///
Expand Down Expand Up @@ -903,6 +911,12 @@ class PlatformDispatcher {

final double textScaleFactor = (data['textScaleFactor']! as num).toDouble();
final bool alwaysUse24HourFormat = data['alwaysUse24HourFormat']! as bool;
final bool? nativeSpellCheckServiceDefined = data['nativeSpellCheckServiceDefined'] as bool?;
if (nativeSpellCheckServiceDefined != null) {
_nativeSpellCheckServiceDefined = nativeSpellCheckServiceDefined;
} else {
_nativeSpellCheckServiceDefined = false;
}
// This field is optional.
final bool? brieflyShowPassword = data['brieflyShowPassword'] as bool?;
if (brieflyShowPassword != null) {
Expand Down
9 changes: 9 additions & 0 deletions lib/ui/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,15 @@ class SingletonFlutterWindow extends FlutterWindow {
/// observe when this value changes.
double get textScaleFactor => platformDispatcher.textScaleFactor;

/// Whether the spell check service is supported on the current platform.
///
/// {@macro dart.ui.window.accessorForwardWarning}
///
/// This option is used by [EditableTextState] to define its
/// [SpellCheckConfiguration] when spell check is enabled, but no spell check
/// service is specified.
bool get nativeSpellCheckServiceDefined => platformDispatcher.nativeSpellCheckServiceDefined;

/// Whether briefly displaying the characters as you type in obscured text
/// fields is enabled in system settings.
///
Expand Down
2 changes: 2 additions & 0 deletions lib/web_ui/lib/platform_dispatcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ abstract class PlatformDispatcher {

double get textScaleFactor => configuration.textScaleFactor;

bool get nativeSpellCheckServiceDefined => false;

bool get brieflyShowPassword => true;

VoidCallback? get onTextScaleFactorChanged;
Expand Down
2 changes: 2 additions & 0 deletions lib/web_ui/lib/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ abstract class SingletonFlutterWindow extends FlutterWindow {

double get textScaleFactor => platformDispatcher.textScaleFactor;

bool get nativeSpellCheckServiceDefined => platformDispatcher.nativeSpellCheckServiceDefined;

bool get brieflyShowPassword => platformDispatcher.brieflyShowPassword;

bool get alwaysUse24HourFormat => platformDispatcher.alwaysUse24HourFormat;
Expand Down
2 changes: 2 additions & 0 deletions shell/platform/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ android_java_sources = [
"io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java",
"io/flutter/embedding/engine/systemchannels/RestorationChannel.java",
"io/flutter/embedding/engine/systemchannels/SettingsChannel.java",
"io/flutter/embedding/engine/systemchannels/SpellCheckChannel.java",
"io/flutter/embedding/engine/systemchannels/SystemChannel.java",
"io/flutter/embedding/engine/systemchannels/TextInputChannel.java",
"io/flutter/plugin/common/ActivityLifecycleListener.java",
Expand All @@ -260,6 +261,7 @@ android_java_sources = [
"io/flutter/plugin/editing/ImeSyncDeferringInsetsCallback.java",
"io/flutter/plugin/editing/InputConnectionAdaptor.java",
"io/flutter/plugin/editing/ListenableEditingState.java",
"io/flutter/plugin/editing/SpellCheckPlugin.java",
"io/flutter/plugin/editing/TextEditingDelta.java",
"io/flutter/plugin/editing/TextInputPlugin.java",
"io/flutter/plugin/localization/LocalizationPlugin.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
import android.view.autofill.AutofillValue;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.view.textservice.SpellCheckerInfo;
import android.view.textservice.TextServicesManager;
import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand All @@ -58,6 +60,7 @@
import io.flutter.embedding.engine.renderer.RenderSurface;
import io.flutter.embedding.engine.systemchannels.SettingsChannel;
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.editing.SpellCheckPlugin;
import io.flutter.plugin.editing.TextInputPlugin;
import io.flutter.plugin.localization.LocalizationPlugin;
import io.flutter.plugin.mouse.MouseCursorPlugin;
Expand Down Expand Up @@ -126,10 +129,12 @@ public class FlutterView extends FrameLayout
// existing, stateless system channels, e.g., MouseCursorChannel, TextInputChannel, etc.
@Nullable private MouseCursorPlugin mouseCursorPlugin;
@Nullable private TextInputPlugin textInputPlugin;
@Nullable private SpellCheckPlugin spellCheckPlugin;
@Nullable private LocalizationPlugin localizationPlugin;
@Nullable private KeyboardManager keyboardManager;
@Nullable private AndroidTouchProcessor androidTouchProcessor;
@Nullable private AccessibilityBridge accessibilityBridge;
@Nullable private TextServicesManager textServicesManager;

// Provides access to foldable/hinge information
@Nullable private WindowInfoRepositoryCallbackAdapterWrapper windowInfoRepo;
Expand Down Expand Up @@ -1141,6 +1146,17 @@ public void attachToFlutterEngine(@NonNull FlutterEngine flutterEngine) {
this,
this.flutterEngine.getTextInputChannel(),
this.flutterEngine.getPlatformViewsController());

try {
textServicesManager =
(TextServicesManager)
getContext().getSystemService(Context.TEXT_SERVICES_MANAGER_SERVICE);
spellCheckPlugin =
new SpellCheckPlugin(textServicesManager, this.flutterEngine.getSpellCheckChannel());
} catch (Exception e) {
Log.e(TAG, "TextServicesManager not supported by device, spell check disabled.");
}

localizationPlugin = this.flutterEngine.getLocalizationPlugin();

keyboardManager = new KeyboardManager(this);
Expand Down Expand Up @@ -1238,6 +1254,9 @@ public void detachFromFlutterEngine() {
textInputPlugin.getInputMethodManager().restartInput(this);
textInputPlugin.destroy();
keyboardManager.destroy();
if (spellCheckPlugin != null) {
spellCheckPlugin.destroy();
}

if (mouseCursorPlugin != null) {
mouseCursorPlugin.destroy();
Expand Down Expand Up @@ -1422,10 +1441,34 @@ public void removeFlutterEngineAttachmentListener(
? SettingsChannel.PlatformBrightness.dark
: SettingsChannel.PlatformBrightness.light;

boolean isNativeSpellCheckServiceDefined = false;

if (textServicesManager != null) {
if (Build.VERSION.SDK_INT >= 31) {
List<SpellCheckerInfo> enabledSpellCheckerInfos =
textServicesManager.getEnabledSpellCheckerInfos();
boolean gboardSpellCheckerEnabled =
enabledSpellCheckerInfos.stream()
.anyMatch(
spellCheckerInfo ->
spellCheckerInfo
.getPackageName()
.equals("com.google.android.inputmethod.latin"));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this detecting if the spell checker is for latin-only languages? what part makes this Gboard specific? What about for Hindi, Japanese, etc...? I think it's ok to start with latin only, but we would probably need to file a bug after confirming the behavior for non-latin languages.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, this package covers all of the languages that the Gboard spell checker supports, which is also the only spell checker I've actually tested. This check was an accident on my part -- I confused the spell checker(s) that Android supports with this spell checker.

I can remove this check. Alternatively, I can leave it and file a bug, as you suggested, to verify the behavior of other spell checkers.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug filed works


// Checks if enabled spell checker is the one that is suppported by Gboard, which is
// the one Flutter supports by default.
isNativeSpellCheckServiceDefined =
textServicesManager.isSpellCheckerEnabled() && gboardSpellCheckerEnabled;
} else {
isNativeSpellCheckServiceDefined = true;
}
}

flutterEngine
.getSettingsChannel()
.startMessage()
.setTextScaleFactor(getResources().getConfiguration().fontScale)
.setNativeSpellCheckServiceDefined(isNativeSpellCheckServiceDefined)
.setBrieflyShowPassword(
Settings.System.getInt(
getContext().getContentResolver(), Settings.System.TEXT_SHOW_PASSWORD, 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import io.flutter.embedding.engine.systemchannels.PlatformChannel;
import io.flutter.embedding.engine.systemchannels.RestorationChannel;
import io.flutter.embedding.engine.systemchannels.SettingsChannel;
import io.flutter.embedding.engine.systemchannels.SpellCheckChannel;
import io.flutter.embedding.engine.systemchannels.SystemChannel;
import io.flutter.embedding.engine.systemchannels.TextInputChannel;
import io.flutter.plugin.localization.LocalizationPlugin;
Expand Down Expand Up @@ -93,6 +94,7 @@ public class FlutterEngine {
@NonNull private final RestorationChannel restorationChannel;
@NonNull private final PlatformChannel platformChannel;
@NonNull private final SettingsChannel settingsChannel;
@NonNull private final SpellCheckChannel spellCheckChannel;
@NonNull private final SystemChannel systemChannel;
@NonNull private final TextInputChannel textInputChannel;

Expand Down Expand Up @@ -306,6 +308,7 @@ public FlutterEngine(
platformChannel = new PlatformChannel(dartExecutor);
restorationChannel = new RestorationChannel(dartExecutor, waitForRestorationData);
settingsChannel = new SettingsChannel(dartExecutor);
spellCheckChannel = new SpellCheckChannel(dartExecutor);
systemChannel = new SystemChannel(dartExecutor);
textInputChannel = new TextInputChannel(dartExecutor);

Expand Down Expand Up @@ -550,6 +553,12 @@ public TextInputChannel getTextInputChannel() {
return textInputChannel;
}

/** System channel that sends and receives spell check requests and results. */
@NonNull
public SpellCheckChannel getSpellCheckChannel() {
return spellCheckChannel;
}

/**
* Plugin registry, which registers plugins that want to be applied to this {@code FlutterEngine}.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class SettingsChannel {

public static final String CHANNEL_NAME = "flutter/settings";
private static final String TEXT_SCALE_FACTOR = "textScaleFactor";
private static final String NATIVE_SPELL_CHECK_SERVICE_DEFINED = "nativeSpellCheckServiceDefined";
private static final String BRIEFLY_SHOW_PASSWORD = "brieflyShowPassword";
private static final String ALWAYS_USE_24_HOUR_FORMAT = "alwaysUse24HourFormat";
private static final String PLATFORM_BRIGHTNESS = "platformBrightness";
Expand Down Expand Up @@ -42,6 +43,13 @@ public MessageBuilder setTextScaleFactor(float textScaleFactor) {
return this;
}

@NonNull
public MessageBuilder setNativeSpellCheckServiceDefined(
boolean nativeSpellCheckServiceDefined) {
message.put(NATIVE_SPELL_CHECK_SERVICE_DEFINED, nativeSpellCheckServiceDefined);
return this;
}

@NonNull
public MessageBuilder setBrieflyShowPassword(@NonNull boolean brieflyShowPassword) {
message.put(BRIEFLY_SHOW_PASSWORD, brieflyShowPassword);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package io.flutter.embedding.engine.systemchannels;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import io.flutter.Log;
import io.flutter.embedding.engine.dart.DartExecutor;
import io.flutter.plugin.common.JSONMethodCodec;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import org.json.JSONArray;
import org.json.JSONException;

/**
* {@link 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.
*
* <p>When there is new text to be spell checked, the framework will send to the embedding the
* message {@code SpellCheck.initiateSpellCheck} with the {@code String} locale to spell check with
* and the {@code String} of text to spell check as arguments. In response, the {@link
* io.flutter.plugin.editing.SpellCheckPlugin} will make a call to Android's spell check service to
* fetch spell check results for the specified text.
*
* <p>Once the spell check results are received by the {@link
* io.flutter.plugin.editing.SpellCheckPlugin}, it will send to the framework the message {@code
* SpellCheck.updateSpellCheckResults} with the {@code ArrayList<String>} of encoded spell check
* results (see {@link
* io.flutter.plugin.editing.SpellCheckPlugin#onGetSentenceSuggestions(SentenceSuggestionsInfo[])}
* for details) with the text that these results correspond to appeneded to the front as an
* argument. For example, the argument may look like: {@code {"Hello, wrold!",
* "7.11.world\nword\nold"}}.
*
* <p>{@link io.flutter.plugin.editing.SpellCheckPlugin} implements {@link SpellCheckMethodHandler}
* to initiate spell check. Implement {@link SpellCheckMethodHandler} to respond to spell check
* requests.
*/
public class SpellCheckChannel {
private static final String TAG = "SpellCheckChannel";

public final MethodChannel channel;
private SpellCheckMethodHandler spellCheckMethodHandler;

@NonNull
public final MethodChannel.MethodCallHandler parsingMethodHandler =
new MethodChannel.MethodCallHandler() {
@Override
public void onMethodCall(@NonNull MethodCall call, @NonNull MethodChannel.Result result) {
if (spellCheckMethodHandler == null) {
Log.v(
TAG,
"No SpellCheckeMethodHandler registered, call not forwarded to spell check API.");
return;
}
String method = call.method;
Object args = call.arguments;
Log.v(TAG, "Received '" + method + "' message.");
switch (method) {
case "SpellCheck.initiateSpellCheck":
try {
final JSONArray argumentList = (JSONArray) args;
String locale = argumentList.getString(0);
String text = argumentList.getString(1);
spellCheckMethodHandler.initiateSpellCheck(locale, text, result);
} catch (JSONException exception) {
result.error("error", exception.getMessage(), null);
}
break;
default:
result.notImplemented();
break;
}
}
};

public SpellCheckChannel(@NonNull DartExecutor dartExecutor) {
channel = new MethodChannel(dartExecutor, "flutter/spellcheck", JSONMethodCodec.INSTANCE);
channel.setMethodCallHandler(parsingMethodHandler);
}

/**
* Sets the {@link SpellCheckMethodHandler} which receives all requests to spell check the
* specified text sent through this channel.
*/
public void setSpellCheckMethodHandler(
@Nullable SpellCheckMethodHandler spellCheckMethodHandler) {
this.spellCheckMethodHandler = spellCheckMethodHandler;
}

public interface SpellCheckMethodHandler {
/**
* Requests that spell check is initiated for the specified text, which will respond to the
* {@code result} with either success if spell check results are received or error if the
* request is skipped.
*/
void initiateSpellCheck(
@NonNull String locale, @NonNull String text, @NonNull MethodChannel.Result result);
}
}
Loading