EmailPhoneTextFiledConfig class

Constructors

EmailPhoneTextFiledConfig({GlobalKey<FormFieldState>? formFieldKey, String? initialCountryCode, String languageCode = 'en', Iterable<String>? autofillHints, bool obscureText = false, TextAlign textAlign = TextAlign.left, TextAlignVertical? textAlignVertical, VoidCallback? onTap, bool readOnly = false, String? initialValue, TextInputType? keyboardType, TextEditingController? controller, FocusNode? focusNode, InputDecoration? decoration, TextStyle? style, TextStyle? dropdownTextStyle, void onSubmitted(String)?, ValueChanged<({PhoneNumber? number, String? value})>? onChanged, List<Country>? countries, ValueChanged<Country>? onCountryChanged, FormFieldSetter<({PhoneNumber? number, String? value})>? onSaved, bool showDropdownIcon = true, BoxDecoration dropdownDecoration = const BoxDecoration(), List<TextInputFormatter>? inputFormatters, bool enabled = true, Brightness? keyboardAppearance, @Deprecated('Use searchFieldInputDecoration of PickerDialogStyle instead') String searchText = 'Search country', IconPosition dropdownIconPosition = IconPosition.leading, Icon dropdownIcon = const Icon(Icons.arrow_drop_down), bool autofocus = false, TextInputAction? textInputAction, AutovalidateMode? autovalidateMode = AutovalidateMode.onUserInteraction, bool showCountryFlag = true, Color? cursorColor, bool? disableLengthCheck, EdgeInsetsGeometry flagsButtonPadding = EdgeInsets.zero, String? invalidMessage = 'Invalid Mobile Number', double? cursorHeight, Radius? cursorRadius = Radius.zero, double cursorWidth = 2.0, bool? showCursor = true, PickerDialogStyle? pickerDialogStyle, EdgeInsets flagsButtonMargin = EdgeInsets.zero, TextMagnifierConfiguration? magnifierConfiguration, Widget? prefixIcon, DialogType dialogType = DialogType.showDialog, int? maxLength, int? minLines, int? maxLines, bool expands = false, MaxLengthEnforcement? maxLengthEnforcement, InputCounterWidgetBuilder? buildCounter, void onEditingComplete()?})
const

Properties

autofillHints Iterable<String>?
Enable the autofill hint for phone number.
final
autofocus bool
Whether this text field should focus itself if nothing else is already focused.
final
autovalidateMode AutovalidateMode?
Autovalidate mode for text form field.
final
buildCounter InputCounterWidgetBuilder?
Builds the counter widget.
final
controller TextEditingController?
Controls the text being edited.
final
countries List<Country>?
List of Country to display see countries.dart for format
final
cursorColor Color?
The color of the cursor.
final
cursorHeight double?
How tall the cursor will be.
final
cursorRadius Radius?
How rounded the corners of the cursor should be.
final
cursorWidth double
How thick the cursor will be.
final
decoration InputDecoration?
The decoration to show around the text field.
final
dialogType DialogType
The type of dialog to show when the country selector button is pressed. If DialogType.showDialog, a dialog will be shown. If DialogType.showModalBottomSheet, a modal bottom sheet will be shown. Default is DialogType.showDialog.
final
disableLengthCheck bool?
Disable view Min/Max Length check
final
final
Icon of the drop down button.
final
Position of an icon leading, trailing
final
The style use for the country dial code.
final
enabled bool
If false the widget is "disabled": it ignores taps, the TextFormField's decoration is rendered in grey, decoration's InputDecoration.counterText is set to "", and the drop down icon is hidden no matter showDropdownIcon value.
final
expands bool
Expands the field to fill the parent.
final
flagsButtonMargin EdgeInsets
The margin of the country selector button.
final
flagsButtonPadding EdgeInsetsGeometry
The padding of the Flags Button.
final
focusNode FocusNode?
Defines the keyboard focus for this widget.
final
formFieldKey GlobalKey<FormFieldState>?
The TextFormField key.
final
hashCode int
The hash code for this object.
no setterinherited
initialCountryCode String?
2 letter ISO Code or country dial code.
final
initialValue String?
Initial Value for the field. This property can be used to pre-fill the field.
final
inputFormatters List<TextInputFormatter>?
Optional input validation and formatting overrides.
final
invalidMessage String?
Message to be displayed on autoValidate error
final
keyboardAppearance Brightness?
The appearance of the keyboard.
final
keyboardType TextInputType?
The type of keyboard to use for editing the text.
final
languageCode String
final
magnifierConfiguration TextMagnifierConfiguration?
If null, default magnification configuration will be used.
final
maxLength int?
The maximum number of characters (Unicode scalar values) to allow in the text field.
final
maxLengthEnforcement MaxLengthEnforcement?
The strategy to use when the user has inserted more characters into the text field than are allowed by the current maxLength.
final
maxLines int?
The maximum number of lines to occupy when the content spans more lines.
final
minLines int?
The minimum number of lines to occupy when the content spans fewer lines.
final
obscureText bool
Whether to hide the text being edited (e.g., for passwords).
final
onChanged ValueChanged<({PhoneNumber? number, String? value})>?
Called when the user initiates a change to the TextField's value: when they have inserted or deleted text.
final
onCountryChanged ValueChanged<Country>?
final
onEditingComplete → (void Function()?)
Called when the user submits data.
final
onSaved FormFieldSetter<({PhoneNumber? number, String? value})>?
final
onSubmitted → (void Function(String)?)
Called when the user indicates that they are done editing the text in the field.
final
onTap VoidCallback?
final
pickerDialogStyle → PickerDialogStyle?
Optional set of styles to allow for customizing the country search & pick dialog
final
prefixIcon Widget?
The prefix icon to display in the input field. This icon will be placed before the input field and will be displayed in the decoration. If null, phone country dropdown will be displayed. If not null, phone country dropdown will be hidden.
final
readOnly bool
Whether the text can be changed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchText String
The text that describes the search input field.
final
showCountryFlag bool
Whether to show or hide country flag.
final
showCursor bool?
Whether to show cursor.
final
showDropdownIcon bool
Won't work if enabled is set to false.
final
style TextStyle?
The style to use for the text being edited.
final
textAlign TextAlign
How the text should be aligned horizontally.
final
textAlignVertical TextAlignVertical?
How the text should be aligned vertically.
final
textInputAction TextInputAction?
The type of action button to use for the keyboard.
final

Methods

copyWith({GlobalKey<FormFieldState>? formFieldKey, String? initialCountryCode, String? languageCode, List<String>? autofillHints, bool? obscureText, TextAlign? textAlign, TextAlignVertical? textAlignVertical, VoidCallback? onTap, bool? readOnly, String? initialValue, TextInputType? keyboardType, TextEditingController? controller, FocusNode? focusNode, InputDecoration? decoration, TextStyle? style, TextStyle? dropdownTextStyle, void onSubmitted(String)?, ValueChanged<({PhoneNumber? number, String? value})>? onChanged, List<Country>? countries, ValueChanged<Country>? onCountryChanged, FormFieldSetter<({PhoneNumber? number, String? value})>? onSaved, bool? showDropdownIcon, BoxDecoration? dropdownDecoration, List<TextInputFormatter>? inputFormatters, bool? enabled, Brightness? keyboardAppearance, String? searchText, IconPosition? dropdownIconPosition, Icon? dropdownIcon, bool? autofocus, AutovalidateMode? autovalidateMode, bool? showCountryFlag, Color? cursorColor, bool? disableLengthCheck, EdgeInsetsGeometry? flagsButtonPadding, String? invalidMessage, double? cursorHeight, Radius? cursorRadius, double? cursorWidth, bool? showCursor, PickerDialogStyle? pickerDialogStyle, EdgeInsets? flagsButtonMargin, TextMagnifierConfiguration? magnifierConfiguration, Widget? prefixIcon, DialogType? dialogType, int? maxLength, int? minLines, int? maxLines, bool? expands, MaxLengthEnforcement? maxLengthEnforcement, InputCounterWidgetBuilder? buildCounter, void onEditingComplete()?}) EmailPhoneTextFiledConfig
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited