OTPInput constructor
const
OTPInput({
- Key? key,
- int length = 4,
- InputControlType type = InputControlType.gray,
- bool obscureOtp = false,
- String obscuringCharacter = '•',
- bool autofocus = true,
- bool enabled = true,
- bool readOnly = false,
- bool isError = false,
- bool showErrorMessage = true,
- String errorMessage = 'Invalid OTP code',
- ValueChanged<
String> ? onChanged, - 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,
});