OTPInput constructor

const OTPInput({
  1. Key? key,
  2. int length = 4,
  3. InputControlType type = InputControlType.gray,
  4. bool obscureOtp = false,
  5. String obscuringCharacter = '•',
  6. bool autofocus = true,
  7. bool enabled = true,
  8. bool readOnly = false,
  9. bool isError = false,
  10. bool showErrorMessage = true,
  11. String errorMessage = 'Invalid OTP code',
  12. ValueChanged<String>? onChanged,
  13. ValueChanged<String>? onCompleted,
})

Creates an OTPInput verification instance.

Implementation

const OTPInput({
  super.key,
  this.length = 4,
  this.type = InputControlType.gray,
  this.obscureOtp = false,
  this.obscuringCharacter = '•',
  this.autofocus = true,
  this.enabled = true,
  this.readOnly = false,
  this.isError = false,
  this.showErrorMessage = true,
  this.errorMessage = 'Invalid OTP code',
  this.onChanged,
  this.onCompleted,
});