pin_code_fields
pin_code_fields copied to clipboard
Don't enter anything on web
I try to enter something on web, but I can't. Initialized values from controller are shown, but entered no. OnChanged, Validators methods don't call. Flutter (Channel stable, 2.10.4)
Widget _testPin(BuildContext context) {
return Container(
height: 48,
width: 400,
child: PinCodeTextField(
length: 6,
controller: textEditingController,
onChanged: (String value) {
print("on changed!");
print("value = $value");
},
appContext: context,
keyboardType: TextInputType.number,
pinTheme: PinTheme(
fieldHeight: 48,
fieldWidth: 60,
borderRadius: BorderRadius.circular(8),
inactiveColor: Colors.grey,
activeColor: Colors.grey,
selectedColor: Colors.grey,
shape: PinCodeFieldShape.box,
borderWidth: 1,
),
validator: (v) {
print("validator");
if (v!.length < 5) {
return "I'm from validator";
} else {
return null;
}
},
onCompleted: (v) {
debugPrint("Completed");
},
),
);
}