feat(pinCodeInput): add optional keyboardType (numeric/alphanumeric)#734
Conversation
AhmedAmineZr
left a comment
There was a problem hiding this comment.
update changelog with number of ticket and update the branch
# Conflicts: # ouds_core/lib/components/pin_code_input/digit_input/ouds_digit_input.dart
67a5881 to
fd015b0
Compare
|
Hi, The two PRs are already open in
Both target What you're probably seeing is that the source branches live on my fork ( If you'd prefer the branches to live directly inside Thanks, |
Related issues
Closes #733
Description
Adds an optional
keyboardTypeparameter onOudsDigitInputDecoration, exposed publicly via a new enumOudsPinCodeInputKeyboardTypewith two values:numeric(default) andalphanumeric.numeric, the per-digitTextFieldrequestsTextInputType.numberand rejects non-digit input viaFilteringTextInputFormatter.digitsOnly. The paste handler inOudsPinCodeInputalso sanitizes the incoming string to digits only before populating the cells.alphanumeric, the field requestsTextInputType.textand accepts any character (typed or pasted).The default is
numeric, so existing call sites are unaffected. The demo app exposes the option as a chip group in the PIN code input customization sheet, the code generator emits the parameter only when non-default, and the new label is localized in EN / FR / AR.Motivation & Context
The PIN code input was hard-wired to
TextInputType.numberwith no input formatter, so the soft keyboard was always digits-only but the component silently accepted non-digit input via paste or a hardware keyboard. Some flows reusing this component need short alphanumeric verification or recovery codes; today they fall back to a plainOudsTextInputand lose the per-digit cell layout, focus shifting, masking, and design system styling. This change closes both gaps with a single optional parameter.Types of change
Previews
Checklist
Contribution
Accessibility
Design
Development
Documentation
Checklist (for Core Team only)