#import <FlutterTextInputSemanticsObject.h>
Instance Methods | |
(instancetype) | - initWithPlatformNode:fieldEditor: |
(void) | - updateString:withSelection: |
(void) | - startEditing |
An NSTextField implementation that represents the NativeViewAccessible for the FlutterTextPlatformNode
The NSAccessibility protocol does not provide full support for text editing. This appkit text field is used to get around this problem. The FlutterTextPlatformNode creates a hidden FlutterTextField, since VoiceOver only provides text editing announcements for NSTextField subclasses.
All of the text editing events in this native text field are redirected to the FlutterTextInputPlugin.
Definition at line 81 of file FlutterTextInputSemanticsObject.h.
- (instancetype) initWithPlatformNode: | (flutter::FlutterTextPlatformNode*) | node | |
fieldEditor: | (FlutterTextInputPlugin*) | plugin | |
Initializes a FlutterTextField that uses the FlutterTextInputPlugin as its field editor. The text field redirects all of the text editing events to the FlutterTextInputPlugin.
Definition at line 69 of file FlutterTextInputSemanticsObject.mm.
References _plugin.
- (void) startEditing |
Makes the field editor (plugin) current editor for this TextField, meaning that the text field will start getting editing events.
Definition at line 112 of file FlutterTextInputSemanticsObject.mm.
References _plugin, FlutterTextInputPlugin::client, and updateString:withSelection:.
Referenced by flutter::testing::TEST().
- (void) updateString: | (NSString*) | string | |
withSelection: | (NSRange) | selection | |
Updates the string value and the selection of this text field.
Calling this method is necessary for macOS to get notified about string and selection changes.
Definition at line 80 of file FlutterTextInputSemanticsObject.mm.
References _plugin, and FlutterTextInputPlugin::client.
Referenced by startEditing.