From 3f9987831538dbe86f58aabfdb97704f31d554cc Mon Sep 17 00:00:00 2001 From: Justin McCandless Date: Fri, 11 Jan 2019 10:24:00 -0800 Subject: [PATCH] Match the ios number input type behavior to what is said in the docs (#7281) --- .../darwin/ios/framework/Source/FlutterTextInputPlugin.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm index a50d7b4e515..d6b8873adc6 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm @@ -19,7 +19,9 @@ static UIKeyboardType ToUIKeyboardType(NSDictionary* type) { if ([inputType isEqualToString:@"TextInputType.number"]) { if ([type[@"signed"] boolValue]) return UIKeyboardTypeNumbersAndPunctuation; - return UIKeyboardTypeDecimalPad; + if ([type[@"decimal"] boolValue]) + return UIKeyboardTypeDecimalPad; + return UIKeyboardTypeNumberPad; } if ([inputType isEqualToString:@"TextInputType.phone"]) return UIKeyboardTypePhonePad;