OTPVerificationWidget constructor
const
OTPVerificationWidget({
- Key? key,
- required Future<
bool> onVerify(- String otp
- Future<
void> onResend()?, - int length = 6,
- OTPStyle style = OTPStyle.boxed,
- Duration resendDuration = const Duration(seconds: 60),
- String? title,
- String? subtitle,
- String resendText = 'Resend code',
- String resendingText = 'Sending...',
- TextStyle? titleStyle,
- TextStyle? subtitleStyle,
- TextStyle? resendTextStyle,
- TextStyle? timerTextStyle,
- TextEditingController? otpController,
- bool autoFocus = true,
- bool closeKeyboardOnVerify = true,
- bool showResendButton = true,
- double spacing = 16.0,
- double? pinWidth,
- double? pinHeight,
- String? errorText,
- String? successText,
- bool isLoading = false,
- Widget? loadingWidget,
- bool enabled = true,
Implementation
const OTPVerificationWidget({
super.key,
required this.onVerify,
this.onResend,
this.length = 6,
this.style = OTPStyle.boxed,
this.resendDuration = const Duration(seconds: 60),
this.title,
this.subtitle,
this.resendText = 'Resend code',
this.resendingText = 'Sending...',
this.titleStyle,
this.subtitleStyle,
this.resendTextStyle,
this.timerTextStyle,
this.otpController,
this.autoFocus = true,
this.closeKeyboardOnVerify = true,
this.showResendButton = true,
this.spacing = 16.0,
this.pinWidth,
this.pinHeight,
this.errorText,
this.successText,
this.isLoading = false,
this.loadingWidget,
this.enabled = true,
});