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

Commit f737dc8

Browse files
authored
[macOS] Add XCode marks for TextInputPlugin (#39550)
Adds marks to cleanly separate the sections of TextInputPlugin when viewing in XCode and other IDEs that recognise #pragma mark. This file is getting pretty long. No tests since this is a cleanup with no functional changes.
1 parent 5e3ff1e commit f737dc8

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.mm

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
static NSString* const kTextInputChannel = @"flutter/textinput";
2222

23-
#pragma mark - Textinput channel method names
23+
#pragma mark - TextInput channel method names
2424
// See https://api.flutter.dev/flutter/services/SystemChannels/textInput-constant.html
2525
static NSString* const kSetClientMethod = @"TextInput.setClient";
2626
static NSString* const kShowMethod = @"TextInput.show";
@@ -62,6 +62,7 @@
6262
static NSString* const kTextAffinityDownstream = @"TextAffinity.downstream";
6363
static NSString* const kTextAffinityUpstream = @"TextAffinity.upstream";
6464

65+
#pragma mark - Enums
6566
/**
6667
* The affinity of the current cursor position. If the cursor is at a position representing
6768
* 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) {
7273
kFlutterTextAffinityDownstream
7374
};
7475

76+
#pragma mark - Static functions
77+
7578
/*
7679
* Updates a range given base and extent fields.
7780
*/
@@ -135,6 +138,8 @@ static BOOL EnableAutocomplete(NSDictionary* configuration) {
135138
return EnableAutocompleteForTextInputConfiguration(configuration);
136139
}
137140

141+
#pragma mark - NSEvent (KeyEquivalentMarker) protocol
142+
138143
@interface NSEvent (KeyEquivalentMarker)
139144

140145
// Internally marks that the event was received through performKeyEquivalent:.
@@ -164,6 +169,8 @@ - (BOOL)isKeyEquivalent {
164169

165170
@end
166171

172+
#pragma mark - FlutterTextInputPlugin private interface
173+
167174
/**
168175
* Private properties of FlutterTextInputPlugin.
169176
*/
@@ -285,6 +292,8 @@ - (NSString*)textAffinityString;
285292

286293
@end
287294

295+
#pragma mark - FlutterTextInputPlugin
296+
288297
@implementation FlutterTextInputPlugin {
289298
/**
290299
* The currently active text input model.

0 commit comments

Comments
 (0)