@@ -42,6 +42,7 @@ class PinCodeInputCustomizationState extends CustomizationWidgetState<PinCodeInp
4242 late final PinCodePlaceholderTextState pinCodePlaceholderTextState = PinCodePlaceholderTextState (setState);
4343 late final OutlinedState outlinedState = OutlinedState (setState);
4444 late final ConstrainedMaxWidthState constrainedMaxWidthState = ConstrainedMaxWidthState (setState);
45+ late final PinCodeKeyboardTypeState pinCodeKeyboardTypeState = PinCodeKeyboardTypeState (setState);
4546
4647 // These need context, so they stay as late fields
4748 late final PinCodeHelperTextState pinCodeHelperTextState;
@@ -102,6 +103,10 @@ class PinCodeInputCustomizationState extends CustomizationWidgetState<PinCodeInp
102103 bool get hasOutlined => outlinedState.value;
103104 set hasOutlined (bool value) => outlinedState.value = value;
104105
106+ // Proxy getters and setters to expose the keyboard type selection.
107+ PinCodeKeyboardTypeEnum get selectedKeyboardType => pinCodeKeyboardTypeState.selected;
108+ set selectedKeyboardType (PinCodeKeyboardTypeEnum value) => pinCodeKeyboardTypeState.selected = value;
109+
105110 @override
106111 Widget build (BuildContext context) {
107112 return _PinCodeInputCustomization (
@@ -261,3 +266,25 @@ class OutlinedState {
261266 });
262267 }
263268}
269+
270+ /// Keyboard Type State Management
271+ class PinCodeKeyboardTypeState {
272+ PinCodeKeyboardTypeState (this ._setState);
273+
274+ final void Function (void Function ()) _setState;
275+
276+ final List <PinCodeKeyboardTypeEnum > _list = [
277+ PinCodeKeyboardTypeEnum .numeric,
278+ PinCodeKeyboardTypeEnum .alphanumeric,
279+ ];
280+
281+ List <PinCodeKeyboardTypeEnum > get list => _list;
282+
283+ PinCodeKeyboardTypeEnum _selected = PinCodeKeyboardTypeEnum .numeric;
284+ PinCodeKeyboardTypeEnum get selected => _selected;
285+ set selected (PinCodeKeyboardTypeEnum newValue) {
286+ _setState (() {
287+ _selected = newValue;
288+ });
289+ }
290+ }
0 commit comments