OTPTextField constructor
const
OTPTextField({
- Key? key,
- required int noOfOtpFields,
- required ValueChanged<
String> onCompleted, - double borderWidth = 2,
- bool autoFocus = true,
- bool autoCorrect = false,
- Color borderColor = Colors.blue,
- Color cursorColor = Colors.blue,
- TextAlign textAlign = TextAlign.center,
- EdgeInsetsGeometry margin = const EdgeInsets.only(top: 15, left: 15, right: 15),
- TextStyle textStyle = const TextStyle(fontSize: 16, letterSpacing: 0.27, color: Colors.black),
Implementation
const OTPTextField({
Key? key,
required this.noOfOtpFields,
required this.onCompleted,
this.borderWidth = 2,
this.autoFocus = true,
this.autoCorrect = false,
this.borderColor = Colors.blue,
this.cursorColor = Colors.blue,
this.textAlign = TextAlign.center,
this.margin = const EdgeInsets.only(top: 15, left: 15, right: 15),
this.textStyle = const TextStyle(fontSize: 16, letterSpacing: 0.27, color: Colors.black),
}) : assert(noOfOtpFields > 1),
super(key: key);