OTPTextField constructor

const OTPTextField({
  1. Key? key,
  2. required int noOfOtpFields,
  3. required ValueChanged<String> onCompleted,
  4. double borderWidth = 2,
  5. bool autoFocus = true,
  6. bool autoCorrect = false,
  7. Color borderColor = Colors.blue,
  8. Color cursorColor = Colors.blue,
  9. TextAlign textAlign = TextAlign.center,
  10. EdgeInsetsGeometry margin = const EdgeInsets.only(top: 15, left: 15, right: 15),
  11. 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);