Skip to content

Commit

Permalink
Set iOS text field autocorrection type (flutter#3880)
Browse files Browse the repository at this point in the history
Adds handling for the autocorrect field on TextField on iOS devices.
  • Loading branch information
cbracken authored Jul 14, 2017
1 parent e758dc3 commit 0a99358
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,10 @@ - (void)setTextInputClient:(int)client withConfiguration:(NSDictionary*)configur
_view.keyboardType = ToUIKeyboardType(configuration[@"inputType"]);
_view.autocapitalizationType = ToUITextAutocapitalizationType(configuration[@"inputType"]);
_view.secureTextEntry = [configuration[@"obscureText"] boolValue];
NSString* autocorrect = configuration[@"autocorrect"];
_view.autocorrectionType = autocorrect && ![autocorrect boolValue]
? UITextAutocorrectionTypeNo
: UITextAutocorrectionTypeDefault;
[_view setTextInputClient:client];
[_view reloadInputViews];
}
Expand Down

0 comments on commit 0a99358

Please sign in to comment.