#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterTextInputPlugin.h"
#import <Foundation/Foundation.h>
#import <objc/message.h>
#include <algorithm>
#include <memory>
#include "flutter/fml/platform/darwin/string_range_sanitization.h"
#include "flutter/shell/platform/common/text_editing_delta.h"
#include "flutter/shell/platform/common/text_input_model.h"
#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterCodecs.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterTextInputSemanticsObject.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterViewController_Internal.h"
#import "flutter/shell/platform/darwin/macos/framework/Source/NSView+ClipsToBounds.h"
Go to the source code of this file.
◆ EnableAutocomplete()
static BOOL EnableAutocomplete |
( |
NSDictionary * |
configuration | ) |
|
|
static |
Definition at line 158 of file FlutterTextInputPlugin.mm.
158 {
161 return NO;
162 }
163 }
164
165
167}
static NSString *const kAssociatedAutofillFields
static BOOL EnableAutocompleteForTextInputConfiguration(NSDictionary *configuration)
◆ EnableAutocompleteForTextInputConfiguration()
static BOOL EnableAutocompleteForTextInputConfiguration |
( |
NSDictionary * |
configuration | ) |
|
|
static |
Definition at line 130 of file FlutterTextInputPlugin.mm.
130 {
131
133 return NO;
134 }
135
136
138 if (autofill == nil) {
139 return NO;
140 }
141
142
143
145 if ([hint isEqualToString:@"password"] || [hint isEqualToString:@"username"]) {
146 return NO;
147 }
148 return YES;
149}
static NSString *const kSecureTextEntry
static NSString * GetAutofillHint(NSDictionary *autofill)
static NSString *const kAutofillProperties
◆ GetAutofillHint()
static NSString * GetAutofillHint |
( |
NSDictionary * |
autofill | ) |
|
|
static |
Definition at line 97 of file FlutterTextInputPlugin.mm.
97 {
99 return hints.count > 0 ? hints[0] : nil;
100}
static NSString *const kAutofillHints
◆ GetTextContentType()
static NSTextContentType GetTextContentType |
( |
NSDictionary * |
configuration | ) |
|
|
static |
Definition at line 104 of file FlutterTextInputPlugin.mm.
105 {
106
108 if (autofill) {
110 if ([hint isEqualToString:@"username"]) {
111 return NSTextContentTypeUsername;
112 }
113 if ([hint isEqualToString:@"password"]) {
114 return NSTextContentTypePassword;
115 }
116 if ([hint isEqualToString:@"oneTimeCode"]) {
117 return NSTextContentTypeOneTimeCode;
118 }
119 }
120
122 return NSTextContentTypePassword;
123 }
124 return nil;
125}
◆ NS_ENUM()
typedef NS_ENUM |
( |
NSUInteger |
, |
|
|
FlutterTextAffinity |
|
|
) |
| |
The affinity of the current cursor position. If the cursor is at a position representing a soft line break, the cursor may be drawn either at the end of the current line (upstream) or at the beginning of the next (downstream).
Definition at line 74 of file FlutterTextInputPlugin.mm.
74 {
75 kFlutterTextAffinityUpstream,
76 kFlutterTextAffinityDownstream
77};
◆ RangeFromBaseExtent()
Definition at line 84 of file FlutterTextInputPlugin.mm.
86 {
87 if (
base == nil || extent == nil) {
88 return range;
89 }
90 if (
base.intValue == -1 && extent.intValue == -1) {
92 }
94}
SkRange< size_t > TextRange
◆ _caretRect
◆ _editableTransform
CATransform3D _editableTransform |
Initial value:{
std::unique_ptr<flutter::TextInputModel> _activeModel
Transform for current the editable. Used to determine position of accent selection menu.
Definition at line 334 of file FlutterTextInputPlugin.mm.
◆ kAssociatedAutofillFields
NSString* const kAssociatedAutofillFields = @"@"fields" |
|
static |
◆ kAutofillEditingValue
NSString* const kAutofillEditingValue = @"@"editingValue" |
|
static |
◆ kAutofillHints
NSString* const kAutofillHints = @"@"hints" |
|
static |
◆ kAutofillId
NSString* const kAutofillId = @"@"uniqueIdentifier" |
|
static |
◆ kAutofillProperties
NSString* const kAutofillProperties = @"@"autofill" |
|
static |
◆ kClearClientMethod
NSString* const kClearClientMethod = @"@"TextInput.clearClient" |
|
static |
◆ kComposingBaseKey
NSString* const kComposingBaseKey = @"@"composingBase" |
|
static |
◆ kComposingExtentKey
NSString* const kComposingExtentKey = @"@"composingExtent" |
|
static |
◆ kEnableDeltaModel
◆ kHideMethod
◆ kInputActionNewline
NSString* const kInputActionNewline = @"@"TextInputAction.newline" |
|
static |
◆ kMultilineInputType
NSString* const kMultilineInputType = @"@"TextInputType.multiline" |
|
static |
◆ kPerformAction
NSString* const kPerformAction = @"@"TextInputClient.performAction" |
|
static |
◆ kPerformSelectors
NSString* const kPerformSelectors = @"@"TextInputClient.performSelectors" |
|
static |
◆ kSecureTextEntry
NSString* const kSecureTextEntry = @"@"obscureText" |
|
static |
◆ kSelectionAffinityKey
NSString* const kSelectionAffinityKey = @"@"selectionAffinity" |
|
static |
◆ kSelectionBaseKey
NSString* const kSelectionBaseKey = @"@"selectionBase" |
|
static |
◆ kSelectionExtentKey
NSString* const kSelectionExtentKey = @"@"selectionExtent" |
|
static |
◆ kSelectionIsDirectionalKey
NSString* const kSelectionIsDirectionalKey = @"@"selectionIsDirectional" |
|
static |
◆ kSetCaretRect
NSString* const kSetCaretRect = @"@"TextInput.setCaretRect" |
|
static |
◆ kSetClientMethod
NSString* const kSetClientMethod = @"@"TextInput.setClient" |
|
static |
◆ kSetEditableSizeAndTransform
NSString* const kSetEditableSizeAndTransform = @"@"TextInput.setEditableSizeAndTransform" |
|
static |
◆ kSetEditingStateMethod
NSString* const kSetEditingStateMethod = @"@"TextInput.setEditingState" |
|
static |
◆ kShowMethod
◆ kTextAffinityDownstream
NSString* const kTextAffinityDownstream = @"@"TextAffinity.downstream" |
|
static |
◆ kTextAffinityUpstream
NSString* const kTextAffinityUpstream = @"@"TextAffinity.upstream" |
|
static |
◆ kTextInputAction
NSString* const kTextInputAction = @"@"inputAction" |
|
static |
◆ kTextInputChannel
NSString* const kTextInputChannel = @"@"flutter/textinput" |
|
static |
◆ kTextInputType
NSString* const kTextInputType = @"@"inputType" |
|
static |
◆ kTextInputTypeName
NSString* const kTextInputTypeName = @"@"name" |
|
static |
◆ kTextKey
NSString* const kTextKey = @"@"text" |
|
static |
◆ kTransformKey
NSString* const kTransformKey = @"@"transform" |
|
static |
◆ kUpdateEditStateResponseMethod
NSString* const kUpdateEditStateResponseMethod = @"@"TextInputClient.updateEditingState" |
|
static |
◆ kUpdateEditStateWithDeltasResponseMethod
NSString* const kUpdateEditStateWithDeltasResponseMethod |
|
static |
◆ markerKey