PinCodeTextField constructor
PinCodeTextField({Key key, @required int length, TextEditingController controller, bool obsecureText: false, @required ValueChanged<String> onChanged, ValueChanged<String> onCompleted, Color backgroundColor: Colors.white, BorderRadius borderRadius, double fieldHeight: 50, double fieldWidth: 40, Color activeColor: Colors.green, Color selectedColor: Colors.blue, Color inactiveColor: Colors.red, Color disabledColor: Colors.grey, double borderWidth: 2, MainAxisAlignment mainAxisAlignment: MainAxisAlignment.spaceBetween, Duration animationDuration: const Duration(milliseconds: 150), Curve animationCurve: Curves.easeInOut, PinCodeFieldShape shape: PinCodeFieldShape.underline, AnimationType animationType: AnimationType.slide, TextInputType textInputType: TextInputType.visiblePassword, bool autoFocus: false, FocusNode focusNode, bool enabled: true, List<TextInputFormatter> inputFormatters: const [], String dialogContent: "Do you want to paste this code ", String dialogTitle: "Paste Code", String affirmativeText: "Paste", String negavtiveText: "Cancel", TextStyle textStyle: const TextStyle(fontSize: 20, color: Colors.black, fontWeight: FontWeight.bold) })
Implementation
PinCodeTextField({
Key key,
@required this.length,
this.controller,
this.obsecureText = false,
@required this.onChanged,
this.onCompleted,
this.backgroundColor = Colors.white,
this.borderRadius,
this.fieldHeight = 50,
this.fieldWidth = 40,
this.activeColor = Colors.green,
this.selectedColor = Colors.blue,
this.inactiveColor = Colors.red,
this.disabledColor = Colors.grey,
this.borderWidth = 2,
this.mainAxisAlignment = MainAxisAlignment.spaceBetween,
this.animationDuration = const Duration(milliseconds: 150),
this.animationCurve = Curves.easeInOut,
this.shape = PinCodeFieldShape.underline,
this.animationType = AnimationType.slide,
this.textInputType = TextInputType.visiblePassword,
this.autoFocus = false,
this.focusNode,
this.enabled = true,
this.inputFormatters = const <TextInputFormatter>[],
this.dialogContent = "Do you want to paste this code ",
this.dialogTitle = "Paste Code",
this.affirmativeText = "Paste",
this.negavtiveText = "Cancel",
this.textStyle = const TextStyle(
fontSize: 20,
color: Colors.black,
fontWeight: FontWeight.bold,
),
}) : super(key: key);