IntlPhoneField class
Constructors
IntlPhoneField ({Key ? key , 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 = TextInputType.phone , TextEditingController ? controller , FocusNode ? focusNode , InputDecoration decoration = const InputDecoration() , TextStyle ? style , TextStyle ? dropdownTextStyle , void onSubmitted (String )?, FutureOr <String ? > validator (PhoneNumber? )?, ValueChanged <PhoneNumber > ? onChanged , List <Country > ? countries , ValueChanged <Country > ? onCountryChanged , FormFieldSetter <PhoneNumber > ? 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 = false , 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
dropdownDecoration
→ BoxDecoration
final
dropdownIcon
→ Icon
Icon of the drop down button.
final
dropdownIconPosition
→ IconPosition
Position of an icon leading, trailing
final
dropdownTextStyle
→ TextStyle ?
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 setter inherited
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
key
→ Key ?
Controls how one widget replaces another widget in the tree.
final inherited
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 > ?
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 > ?
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 setter inherited
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
validator
→ (FutureOr <String ? > Function(PhoneNumber? ) ?)
An optional method that validates an input. Returns an error string to display if the input is invalid, or null otherwise.
final
flutter_animated_login 0.0.10