IntlPhoneField constructor
IntlPhoneField({
- String? initialCountryCode,
- bool obscureText = false,
- TextAlign textAlign = TextAlign.left,
- TextAlignVertical? textAlignVertical,
- VoidCallback? onTap,
- bool readOnly = false,
- String? initialValue,
- TextInputType keyboardType = TextInputType.phone,
- bool autovalidate = true,
- TextEditingController? controller,
- FocusNode? focusNode,
- InputDecoration decoration = const InputDecoration(),
- TextStyle? style,
- TextStyle? dropdownTextStyle,
- void onSubmitted()?,
- FutureOr<
String?> validator()?, - ValueChanged<
PhoneNumber> ? onChanged, - List<
String> ? countries, - ValueChanged<
PhoneNumber> ? onCountryChanged, - FormFieldSetter<
PhoneNumber> ? onSaved, - bool showDropdownIcon = true,
- BoxDecoration dropdownDecoration = const BoxDecoration(),
- List<
TextInputFormatter> ? inputFormatters, - bool enabled = true,
- Brightness keyboardAppearance = Brightness.light,
- String searchText = 'Search by Country Name',
- IconPosition iconPosition = IconPosition.leading,
- Icon dropDownIcon = const Icon(Icons.arrow_drop_down),
- bool autofocus = false,
- TextInputAction? textInputAction,
- AutovalidateMode? autovalidateMode = AutovalidateMode.onUserInteraction,
- bool showCountryFlag = true,
- bool dialCodeSearch = true,
- Color? cursorColor,
- bool disableLengthCheck = false,
- EdgeInsetsGeometry flagsButtonPadding = const EdgeInsets.symmetric(vertical: 8),
- String? invalidNumberMessage,
Implementation
IntlPhoneField({
this.initialCountryCode,
this.obscureText = false,
this.textAlign = TextAlign.left,
this.textAlignVertical,
this.onTap,
this.readOnly = false,
this.initialValue,
this.keyboardType = TextInputType.phone,
this.autovalidate = true,
this.controller,
this.focusNode,
this.decoration = const InputDecoration(),
this.style,
this.dropdownTextStyle,
this.onSubmitted,
this.validator,
this.onChanged,
this.countries,
this.onCountryChanged,
this.onSaved,
this.showDropdownIcon = true,
this.dropdownDecoration = const BoxDecoration(),
this.inputFormatters,
this.enabled = true,
this.keyboardAppearance = Brightness.light,
this.searchText = 'Search by Country Name',
this.iconPosition = IconPosition.leading,
this.dropDownIcon = const Icon(Icons.arrow_drop_down),
this.autofocus = false,
this.textInputAction,
this.autovalidateMode = AutovalidateMode.onUserInteraction,
this.showCountryFlag = true,
this.dialCodeSearch = true,
this.cursorColor,
this.disableLengthCheck = false,
this.flagsButtonPadding = const EdgeInsets.symmetric(vertical: 8),
this.invalidNumberMessage,
});