Repository navigation
Add numeric-password variation to TextInputType.numberWithOptions - #190637
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a password parameter to TextInputType.numberWithOptions to support numeric password inputs, updating serialization, string representation, equality, and hashing. The feedback suggests adding a test case to verify that password: true is correctly serialized to JSON, as the current test updates only cover null and false cases.
|
fyi @Renzo-Olivares |
Renzo-Olivares
left a comment
There was a problem hiding this comment.
Mostly LGTM, we should add a TextInputType.password check for EditableTextState._isPasswordInput so spell check remains disabled for this new TextInputType.
flutter/packages/flutter/lib/src/widgets/editable_text.dart
Lines 3107 to 3118 in 3ce270e
|
Done in af4e8a3 — |
|
Fixed in 5f7a90f — dartdoc can't resolve chained references like |
Renzo-Olivares
left a comment
There was a problem hiding this comment.
LGTM, thank you for the contribution @AlexV525!
Working towards #190204.
Framework companion to the engine/embedding change in #190207.
Summary
Adds a
passwordparameter toTextInputType.numberWithOptions, symmetric to the existingvisiblePasswordtext-class variation.On Android this maps to
TYPE_NUMBER_VARIATION_PASSWORD, which the embedding now parses viajson.optBoolean("password", false)and ORs into the NUMBER branch ofTextInputPlugin.inputTypeFromTextInputType(#190207). It has no effect on iOS, web, or desktop.password: truedeclares the platform input classification only. It does not obscure the glyphs Flutter renders — that remains the responsibility ofobscureText.Backward compatibility
false; existingTextInputType.numberandnumberWithOptions(...)callers are byte-for-byte unchanged.passwordkey.obscureText,AutofillHints, orenableIMEPersonalizedLearningsemantics.toJson,operator ==,hashCode,toString, and dartdoc are updated accordingly.Landing order
Per Tree Hygiene the engine JSON parsing + Android mapping (#190207, merged) lands first; this framework field follows once the engine revision is rolled into the framework.
Pre-launch Checklist
///).