diff --git a/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java b/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java index 9cbd823bf9c7f925adc0b9677663672e902b276d..4d517522fd37666511721f9264cc392b164df13d 100644 --- a/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java +++ b/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java @@ -84,6 +84,8 @@ public class TextInputPlugin implements MethodCallHandler { int textType = InputType.TYPE_CLASS_TEXT; if (inputType.equals("TextInputType.emailAddress")) textType |= InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS; + else if (inputType.equals("TextInputType.url")) + textType |= InputType.TYPE_TEXT_VARIATION_URI; if (obscureText) textType |= InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS; return textType; diff --git a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm index f80cf49e70be1b89bf8e510365453e146a791773..8a27efb5fc36a2965e4a3008edeacdb01a44ef1b 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterTextInputPlugin.mm @@ -18,6 +18,8 @@ static UIKeyboardType ToUIKeyboardType(NSString* inputType) { return UIKeyboardTypePhonePad; if ([inputType isEqualToString:@"TextInputType.emailAddress"]) return UIKeyboardTypeEmailAddress; + if ([inputType isEqualToString:@"TextInputType.url"]) + return UIKeyboardTypeURL; return UIKeyboardTypeDefault; }