PhoneTextField class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PhoneTextField
Constructors
-
PhoneTextField({Key? key, String? initialCountryCode, TextAlign textAlign = TextAlign.left, bool isRequired = true, bool showCountryCodeAsIcon = false, String? initialValue, TextEditingController? controller, FocusNode? focusNode, InputDecoration decoration = const InputDecoration(labelText: "Phone number"), Locale locale = const Locale('en', ''), ValueChanged<
PhoneNumber> ? onChanged, List<String> ? countries, bool enabled = true, Icon dropdownIcon = const Icon(Icons.arrow_drop_down), bool autofocus = false, AutovalidateMode? autovalidateMode = AutovalidateMode.onUserInteraction, bool disableLengthCheck = false, String? invalidNumberMessage = 'Invalid Phone Number', String? dialogTitle = "Select Country", InputDecoration? searchFieldInputDecoration, ValueChanged<String> ? onSubmit, TextStyle? textStyle, TextStyle? searchTextStyle, CountryViewOptions countryViewOptions = CountryViewOptions.countryCodeOnly}) -
const
Properties
- 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
- controller → TextEditingController?
-
Controls the text being edited.
final
-
countries
→ List<
String> ? -
List of 2 Letter ISO Codes of countries to show. Defaults to showing the inbuilt list of all countries.
final
- countryViewOptions → CountryViewOptions
-
to show country result data.
If CountryViewOptions.countryNameOnly, to show country name only.
If CountryViewOptions.countryNameWithFlag, to show country name with flag.
If CountryViewOptions.countryCodeOnly, to show country code only.
If CountryViewOptions.countryCodeWithFlag, to show country flag with code.
If CountryViewOptions.countryFlagOnly, to show country flag only.
Default is countryViewOptions : CountryViewOptions.countryCodeOnly
final
- decoration → InputDecoration
-
The decoration to show around the text field.
final
- dialogTitle → String?
-
Message to be displayed on dialog title
final
- disableLengthCheck → bool
-
Disable view Min/Max Length check
final
- dropdownIcon → Icon
-
Icon of the drop down button.
final
- enabled → bool
-
final
- focusNode → FocusNode?
-
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
- invalidNumberMessage → String?
-
Message to be displayed on autoValidate error
final
- isRequired → bool
-
to required validation number.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- locale → Locale
-
Localalization.
final
-
onChanged
→ ValueChanged<
PhoneNumber> ? -
Called when the user initiates a change to the TextField's
value: when they have inserted or deleted text.
final
-
onSubmit
→ ValueChanged<
String> ? -
onSubmit of keypoard
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchFieldInputDecoration → InputDecoration?
-
Optional set of styles to allow for customizing the country search
& pick dialog
final
- searchTextStyle → TextStyle?
-
TextStyle of TextFormField when search
final
- showCountryCodeAsIcon → bool
-
to show country code as icon.
final
- textAlign → TextAlign
-
How the text should be aligned horizontally.
final
- textStyle → TextStyle?
-
TextStyle of TextFormField
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _PhoneTextFieldState -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited