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
135
135
NSString * characters = getEventCharacters (press.key .characters , press.key .keyCode );
136
136
NSString * charactersIgnoringModifiers =
137
137
getEventCharacters (press.key .charactersIgnoringModifiers , press.key .keyCode );
138
- NSMutableDictionary * keyMessage = [ @{
138
+ NSDictionary * keyMessage = @{
139
139
@" keymap" : @" ios" ,
140
140
@" type" : type,
141
141
@" keyCode" : @(press.key .keyCode ),
@@ -144,7 +144,7 @@ - (void)handlePress:(nonnull FlutterUIPressProxy*)press
144
144
@" charactersIgnoringModifiers" : charactersIgnoringModifiers == nil
145
145
? @" "
146
146
: charactersIgnoringModifiers,
147
- } mutableCopy] ;
147
+ };
148
148
[self .channel sendMessage: keyMessage
149
149
reply: ^(id reply) {
150
150
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 {
102
102
}
103
103
} while (nextSpellSuggestion != nil && nextOffset < text.length );
104
104
105
- NSMutableArray * methodChannelResult = [[NSMutableArray alloc ] init ];
105
+ NSMutableArray * methodChannelResult =
106
+ [[NSMutableArray alloc ] initWithCapacity: allSpellSuggestions.count];
106
107
107
108
for (FlutterSpellCheckResult* result in allSpellSuggestions) {
108
109
[methodChannelResult addObject: [result toDictionary ]];
You can’t perform that action at this time.
0 commit comments