#import <FlutterTextInputPlugin.h>
Instance Methods | |
(instancetype) | - initWithViewController: |
(BOOL) | - isFirstResponder |
(BOOL) | - handleKeyEvent: |
(void) | - handleMethodCall:result: |
(NSRect) | - firstRectForCharacterRange:actualRange: |
(NSDictionary *) | - editingState |
Properties | |
FlutterTextField * | client |
NSTextInputContext * | textInputContext |
NSString * | customRunLoopMode |
A plugin to handle text input.
Responsible for bridging the native macOS text input system with the Flutter framework text editing classes, via system channels.
This is not an FlutterPlugin since it needs access to FlutterViewController internals, so needs to be managed differently.
When accessibility is on, accessibility bridge creates a NSTextField, i.e. FlutterTextField, for every text field in the Flutter. This plugin acts as a field editor for those NSTextField[s].
Definition at line 27 of file FlutterTextInputPlugin.h.
- (NSDictionary*) editingState |
Provided by category FlutterTextInputPlugin(TestMethods).
Referenced by FlutterInputPluginTestObjc::testClearClientDuringComposing, and FlutterInputPluginTestObjc::testEmptyCompositionRange.
- (NSRect) firstRectForCharacterRange: | (NSRange) | range | |
actualRange: | (NSRangePointer) | actualRange | |
Provided by category FlutterTextInputPlugin(TestMethods).
- (BOOL) handleKeyEvent: | (NSEvent*) | event |
Handles key down events received from the view controller, responding YES if the event was handled.
Note, the Apple docs suggest that clients should override essentially all the mouse and keyboard event-handling methods of NSResponder. However, experimentation indicates that only key events are processed by the native layer; Flutter processes mouse events. Additionally, processing both keyUp and keyDown results in duplicate processing of the same keys.
Definition at line 605 of file FlutterTextInputPlugin.mm.
- (void) handleMethodCall: | (FlutterMethodCall *) | call | |
result: | (FlutterResult) | result | |
Provided by category FlutterTextInputPlugin(TestMethods).
Referenced by flutter::testing::TEST(), FlutterInputPluginTestObjc::testClearClientDuringComposing, and FlutterInputPluginTestObjc::testEmptyCompositionRange.
- (instancetype) initWithViewController: | (FlutterViewController*) | viewController |
Initializes a text input plugin that coordinates key event handling with |viewController|.
Definition at line 342 of file FlutterTextInputPlugin.mm.
References _caretRect, _editableTransform, and FlutterMethodChannel::methodChannelWithName:binaryMessenger:codec:.
- (BOOL) isFirstResponder |
Whether this plugin is the first responder of this NSWindow.
When accessibility is on, this plugin is set as the first responder to act as the field editor for FlutterTextFields.
Returns false if accessibility is off.
Definition at line 373 of file FlutterTextInputPlugin.mm.
|
readwritenonatomicweak |
The NSTextField that currently has this plugin as its field editor.
Must be nil if accessibility is off.
Definition at line 34 of file FlutterTextInputPlugin.h.
Referenced by FlutterTextField::startEditing, and FlutterTextField::updateString:withSelection:.
|
readwritenonatomicassign |
Provided by category FlutterTextInputPlugin(TestMethods).
Definition at line 71 of file FlutterTextInputPlugin.h.
|
readwritenonatomicassign |
Provided by category FlutterTextInputPlugin(TestMethods).
Definition at line 70 of file FlutterTextInputPlugin.h.