diff --git a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm index c5bdca27ce986..e28afd2c23b59 100644 --- a/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm @@ -20,7 +20,7 @@ static NSString* const kTextInputChannel = @"flutter/textinput"; -#pragma mark - Textinput channel method names +#pragma mark - TextInput channel method names // See https://api.flutter.dev/flutter/services/SystemChannels/textInput-constant.html static NSString* const kSetClientMethod = @"TextInput.setClient"; static NSString* const kShowMethod = @"TextInput.show"; @@ -62,6 +62,7 @@ static NSString* const kTextAffinityDownstream = @"TextAffinity.downstream"; static NSString* const kTextAffinityUpstream = @"TextAffinity.upstream"; +#pragma mark - Enums /** * The affinity of the current cursor position. If the cursor is at a position representing * a line break, the cursor may be drawn either at the end of the current line (upstream) @@ -72,6 +73,8 @@ typedef NS_ENUM(NSUInteger, FlutterTextAffinity) { kFlutterTextAffinityDownstream }; +#pragma mark - Static functions + /* * Updates a range given base and extent fields. */ @@ -135,6 +138,8 @@ static BOOL EnableAutocomplete(NSDictionary* configuration) { return EnableAutocompleteForTextInputConfiguration(configuration); } +#pragma mark - NSEvent (KeyEquivalentMarker) protocol + @interface NSEvent (KeyEquivalentMarker) // Internally marks that the event was received through performKeyEquivalent:. @@ -164,6 +169,8 @@ - (BOOL)isKeyEquivalent { @end +#pragma mark - FlutterTextInputPlugin private interface + /** * Private properties of FlutterTextInputPlugin. */ @@ -285,6 +292,8 @@ - (NSString*)textAffinityString; @end +#pragma mark - FlutterTextInputPlugin + @implementation FlutterTextInputPlugin { /** * The currently active text input model.