PhoneFieldConfig constructor

const PhoneFieldConfig({
  1. String? initialCountryCode,
  2. String defaultCountryCode = 'US',
  3. bool enableSearch = true,
  4. bool showFlag = true,
  5. bool showDialCode = true,
  6. bool showDropdownIcon = true,
  7. IconData dropdownIcon = Icons.arrow_drop_down,
  8. InputDecoration? searchDecoration,
  9. String dialogTitle = 'Select Country',
  10. String searchHintText = 'Search by name or dial code',
  11. EdgeInsetsGeometry selectorButtonPadding = const EdgeInsets.all(8),
  12. InputDecoration? decoration,
  13. TextStyle? dialCodeTextStyle,
  14. bool autofocus = false,
  15. bool obscureText = false,
  16. TextInputType keyboardType = TextInputType.phone,
  17. TextInputAction textInputAction = TextInputAction.done,
  18. AutovalidateMode autovalidateMode = AutovalidateMode.onUserInteraction,
  19. bool showErrorBorder = true,
  20. Color? cursorColor,
  21. int maxLines = 1,
  22. int minLines = 1,
  23. int? maxLength,
  24. bool enableInteractiveSelection = true,
  25. bool readOnly = false,
  26. List<String>? countryCodes,
  27. List<String>? preferredCountries,
  28. int maxPhoneLength = 0,
  29. int minPhoneLength = 0,
  30. String emptyErrorMessage = 'Please enter phone number',
  31. String? successMessage,
  32. bool showSuccessIndicator = true,
  33. IconData successIcon = Icons.check_circle_outline_rounded,
  34. Color successColor = Colors.green,
  35. Color errorColor = Colors.red,
  36. bool showValidationOnEmpty = false,
  37. bool enablePatternValidation = true,
})

Implementation

const PhoneFieldConfig({
  this.initialCountryCode,
  this.defaultCountryCode = 'US',
  this.enableSearch = true,
  this.showFlag = true,
  this.showDialCode = true,
  this.showDropdownIcon = true,
  this.dropdownIcon = Icons.arrow_drop_down,
  this.searchDecoration,
  this.dialogTitle = 'Select Country',
  this.searchHintText = 'Search by name or dial code',
  this.selectorButtonPadding = const EdgeInsets.all(8),
  this.decoration,
  this.dialCodeTextStyle,
  this.autofocus = false,
  this.obscureText = false,
  this.keyboardType = TextInputType.phone,
  this.textInputAction = TextInputAction.done,
  this.autovalidateMode = AutovalidateMode.onUserInteraction,
  this.showErrorBorder = true,
  this.cursorColor,
  this.maxLines = 1,
  this.minLines = 1,
  this.maxLength,
  this.enableInteractiveSelection = true,
  this.readOnly = false,
  this.countryCodes,
  this.preferredCountries,
  this.maxPhoneLength = 0,
  this.minPhoneLength = 0,
  this.emptyErrorMessage = 'Please enter phone number',
  this.successMessage,
  this.showSuccessIndicator = true,
  this.successIcon = Icons.check_circle_outline_rounded,
  this.successColor = Colors.green,
  this.errorColor = Colors.red,
  this.showValidationOnEmpty = false,
  this.enablePatternValidation = true,
});