OTPEnterPhoneNumber constructor
const
OTPEnterPhoneNumber({
- required VoidCallback onSendPressed,
- required TextEditingController controller,
- Key? key,
- void onInputChanged(
- PhoneNumber number
- void onInputValidated(
- bool value
- void onSaved(
- PhoneNumber number
- Widget? logo,
- String descriptionText = 'Enter your phone number and we will send you a OTP code for verification',
- String? buttonText = 'Send link',
- SelectorConfig customSelectorConfig = const SelectorConfig(selectorType: PhoneInputSelectorType.BOTTOM_SHEET, useBottomSheetSafeArea: true, leadingPadding: 20, setSelectorButtonAsPrefixIcon: true),
- AutovalidateMode customAutoValidateMode = AutovalidateMode.disabled,
- PhoneNumber? phoneNumber,
- InputDecoration customInputDecoration = const InputDecoration(),
- InputDecoration customSearchBoxInputDecoration = const InputDecoration(),
- InputBorder customInputBorder = const OutlineInputBorder(),
- bool formatInput = false,
- VoidCallback? onSubmit,
- String? onValidate()?,
- String? onFieldSubmitted(
- String value
- TextInputType keyboardType = const TextInputType.numberWithOptions(signed: true, decimal: true),
- TextStyle selectorTextStyle = const TextStyle(color: Colors.black),
Implementation
const OTPEnterPhoneNumber({
required this.onSendPressed,
required this.controller,
super.key,
this.onInputChanged,
this.onInputValidated,
this.onSaved,
this.logo,
this.descriptionText =
'Enter your phone number and we will send you a OTP code for verification',
this.buttonText = 'Send link',
this.customSelectorConfig = const SelectorConfig(
selectorType: PhoneInputSelectorType.BOTTOM_SHEET,
useBottomSheetSafeArea: true,
leadingPadding: 20,
setSelectorButtonAsPrefixIcon: true,
),
this.customAutoValidateMode = AutovalidateMode.disabled,
this.phoneNumber,
this.customInputDecoration = const InputDecoration(),
this.customSearchBoxInputDecoration = const InputDecoration(),
this.customInputBorder = const OutlineInputBorder(),
this.formatInput = false,
this.onSubmit,
this.onValidate,
this.onFieldSubmitted,
this.keyboardType =
const TextInputType.numberWithOptions(signed: true, decimal: true),
this.selectorTextStyle = const TextStyle(
color: Colors.black,
),
});