Add support for Android's visible password input type (flutter/engine#9999)
For framework PR https://github.com/flutter/flutter/issues/31738
This commit is contained in:
committed by
GitHub
parent
1299da0e74
commit
1b87854bf5
@@ -371,7 +371,8 @@ public class TextInputChannel {
|
||||
PHONE("TextInputType.phone"),
|
||||
MULTILINE("TextInputType.multiline"),
|
||||
EMAIL_ADDRESS("TextInputType.emailAddress"),
|
||||
URL("TextInputType.url");
|
||||
URL("TextInputType.url"),
|
||||
VISIBLE_PASSWORD("TextInputType.visiblePassword");
|
||||
|
||||
static TextInputType fromValue(@NonNull String encodedName) throws NoSuchFieldException {
|
||||
for (TextInputType textInputType : TextInputType.values()) {
|
||||
|
||||
@@ -155,6 +155,8 @@ public class TextInputPlugin {
|
||||
textType |= InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;
|
||||
} else if (type.type == TextInputChannel.TextInputType.URL) {
|
||||
textType |= InputType.TYPE_TEXT_VARIATION_URI;
|
||||
} else if (type.type == TextInputChannel.TextInputType.VISIBLE_PASSWORD) {
|
||||
textType |= InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;
|
||||
}
|
||||
|
||||
if (obscureText) {
|
||||
|
||||
Reference in New Issue
Block a user