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

Commit 3d7715d

Browse files
committed
Review edits
1 parent 5066c4c commit 3d7715d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

shell/platform/darwin/ios/framework/Source/FlutterChannelKeyResponder.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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]];

0 commit comments

Comments
 (0)