From 2beda325c12b3ef517fda8d0a7ace906942cd246 Mon Sep 17 00:00:00 2001 From: Justin McCandless Date: Fri, 21 Dec 2018 10:04:25 -0800 Subject: [PATCH] Match the ios number input type behavior to what is said in the docs --- .../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 a50d7b4e5157a..d6b8873adc6bc 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;