| Flutter iOS Embedder |

Instance Methods | List of all members
FlutterSpellCheckPlugin Class Reference

`#import <FlutterSpellCheckPlugin.h>`

Inheritance diagram for FlutterSpellCheckPlugin:

## Instance Methods
(void) | - handleMethodCall:result:

## Detailed Description

Definition at line 13 of file FlutterSpellCheckPlugin.h.

## Method Documentation

## ◆ handleMethodCall:result:

- (void) handleMethodCall: |  | (FlutterMethodCall*) | call
result: |  | (FlutterResult) | result

Definition at line 24 of file FlutterSpellCheckPlugin.mm.

24 :(FlutterMethodCall*)call result:(FlutterResult)result {
25 if (!_textChecker) {
26 // UITextChecker is an expensive object to initiate, see:
27 // https://github.com/flutter/flutter/issues/104454. Lazily initialate the UITextChecker object
28 // until at first method channel call. We avoid using lazy getter for testing.
29 _textChecker = [[UITextChecker alloc] init];
30 }
31 NSString* method = call.method;
32 NSArray* args = call.arguments;
33 if ([method isEqualToString:kInitiateSpellCheck]) {
34 FML_DCHECK(args.count == 2);
35 id language = args[0];
36 id text = args[1];
37 if (language == [NSNull null] || text == [NSNull null]) {
38 // Bail if null arguments are passed from dart.
39 result(nil);
40 return;
41 }
42
43 NSArray<NSDictionary<NSString*, id>*>* spellCheckResult =
44 [self findAllSpellCheckSuggestionsForText:text inLanguage:language];
45 result(spellCheckResult);
46 }
47 }

References FlutterMethodCall::arguments, kInitiateSpellCheck, and FlutterMethodCall::method.

The documentation for this class was generated from the following files:

- shell/platform/darwin/ios/framework/Source/FlutterSpellCheckPlugin.h
- shell/platform/darwin/ios/framework/Source/FlutterSpellCheckPlugin.mm

kInitiateSpellCheck
static NSString *const kInitiateSpellCheck
Definition: FlutterSpellCheckPlugin.mm:14
FlutterMethodCall::method
NSString * method
Definition: FlutterCodecs.h:233
FlutterMethodCall
Definition: FlutterCodecs.h:220
FlutterResult
void(^ FlutterResult)(id _Nullable result)
Definition: FlutterChannels.h:194
FlutterMethodCall::arguments
id arguments
Definition: FlutterCodecs.h:238