OTPEnterPhoneNumber constructor

const OTPEnterPhoneNumber({
  1. required VoidCallback onSendPressed,
  2. required TextEditingController controller,
  3. Key? key,
  4. void onInputChanged(
    1. PhoneNumber number
    )?,
  5. void onInputValidated(
    1. bool value
    )?,
  6. void onSaved(
    1. PhoneNumber number
    )?,
  7. String descriptionText = 'Enter your phone number and we will send you a OTP code for verification',
  8. String? buttonText = 'Send link',
  9. SelectorConfig customSelectorConfig = const SelectorConfig(selectorType: PhoneInputSelectorType.BOTTOM_SHEET, useBottomSheetSafeArea: true, leadingPadding: 20, setSelectorButtonAsPrefixIcon: true),
  10. AutovalidateMode customAutoValidateMode = AutovalidateMode.disabled,
  11. PhoneNumber? phoneNumber,
  12. InputDecoration customInputDecoration = const InputDecoration(),
  13. InputDecoration customSearchBoxInputDecoration = const InputDecoration(),
  14. InputBorder customInputBorder = const OutlineInputBorder(),
  15. bool formatInput = false,
  16. VoidCallback? onSubmit,
  17. String? onValidate(
    1. String?
    )?,
  18. String? onFieldSubmitted(
    1. String value
    )?,
  19. TextInputType keyboardType = const TextInputType.numberWithOptions(signed: true, decimal: true),
  20. 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,
  ),
});