Skip to content

Commit 3f99878

Browse files
authored
Match the ios number input type behavior to what is said in the docs (flutter#7281)
1 parent 358a24c commit 3f99878

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ static UIKeyboardType ToUIKeyboardType(NSDictionary* type) {
1919
if ([inputType isEqualToString:@"TextInputType.number"]) {
2020
if ([type[@"signed"] boolValue])
2121
return UIKeyboardTypeNumbersAndPunctuation;
22-
return UIKeyboardTypeDecimalPad;
22+
if ([type[@"decimal"] boolValue])
23+
return UIKeyboardTypeDecimalPad;
24+
return UIKeyboardTypeNumberPad;
2325
}
2426
if ([inputType isEqualToString:@"TextInputType.phone"])
2527
return UIKeyboardTypePhonePad;

0 commit comments

Comments
 (0)