This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
shell/platform/darwin/ios/framework/Source Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ - (void)handlePress:(nonnull FlutterUIPressProxy*)press
135135 NSString * characters = getEventCharacters (press.key .characters , press.key .keyCode );
136136 NSString * charactersIgnoringModifiers =
137137 getEventCharacters (press.key .charactersIgnoringModifiers , press.key .keyCode );
138- NSMutableDictionary * keyMessage = [ @{
138+ NSDictionary * keyMessage = @{
139139 @" keymap" : @" ios" ,
140140 @" type" : type,
141141 @" keyCode" : @(press.key .keyCode ),
@@ -144,7 +144,7 @@ - (void)handlePress:(nonnull FlutterUIPressProxy*)press
144144 @" charactersIgnoringModifiers" : charactersIgnoringModifiers == nil
145145 ? @" "
146146 : charactersIgnoringModifiers,
147- } mutableCopy] ;
147+ };
148148 [self .channel sendMessage: keyMessage
149149 reply: ^(id reply) {
150150 bool handled = reply ? [[reply valueForKey: @" handled" ] boolValue ] : true ;
Original file line number Diff line number Diff line change @@ -102,7 +102,8 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
102102 }
103103 } while (nextSpellSuggestion != nil && nextOffset < text.length );
104104
105- NSMutableArray * methodChannelResult = [[NSMutableArray alloc ] init ];
105+ NSMutableArray * methodChannelResult =
106+ [[NSMutableArray alloc ] initWithCapacity: allSpellSuggestions.count];
106107
107108 for (FlutterSpellCheckResult* result in allSpellSuggestions) {
108109 [methodChannelResult addObject: [result toDictionary ]];
You can’t perform that action at this time.
0 commit comments