PrismOtpField constructor
- Key? key,
- int length = 6,
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onCompleted, - TextEditingController? controller,
- bool autofocus = false,
- bool enabled = true,
- bool obscure = false,
- double boxSize = 48,
- double gap = 8,
- String? errorText,
- String? helperText,
- Iterable<
String> autofillHints = const [AutofillHints.oneTimeCode], - TextInputType keyboardType = TextInputType.number,
- int? groupSeparatorAfter,
- Color? accentColor,
- bool hasError = false,
- String semanticLabel = 'Verification code',
- Widget boxBuilder(
- BuildContext context,
- int index,
- String char,
- bool focused,
Creates an OTP field.
Implementation
const PrismOtpField({
super.key,
this.length = 6,
this.onChanged,
this.onCompleted,
this.controller,
this.autofocus = false,
this.enabled = true,
this.obscure = false,
this.boxSize = 48,
this.gap = 8,
this.errorText,
this.helperText,
this.autofillHints = const [AutofillHints.oneTimeCode],
this.keyboardType = TextInputType.number,
this.groupSeparatorAfter,
this.accentColor,
this.hasError = false,
this.semanticLabel = 'Verification code',
this.boxBuilder,
});