FormBuilderPhoneField class

Field for international phone number input.

Inheritance

Constructors

FormBuilderPhoneField({Key? key, required String name, FormFieldValidator<String>? validator, String? initialValue, InputDecoration decoration = const InputDecoration(), ValueChanged<String?>? onChanged, ValueTransformer<String?>? valueTransformer, bool enabled = true, FormFieldSetter<String>? onSaved, AutovalidateMode? autovalidateMode, VoidCallback? onReset, FocusNode? focusNode, bool obscureText = false, TextCapitalization textCapitalization = TextCapitalization.none, EdgeInsets scrollPadding = const EdgeInsets.all(20.0), bool enableInteractiveSelection = true, MaxLengthEnforcement maxLengthEnforcement = MaxLengthEnforcement.enforced, TextAlign textAlign = TextAlign.start, bool autofocus = false, bool autocorrect = true, double cursorWidth = 2.0, TextInputType keyboardType = TextInputType.phone, TextStyle? style, TextEditingController? controller, TextInputAction? textInputAction, StrutStyle? strutStyle, TextDirection? textDirection, int? maxLength, VoidCallback? onEditingComplete, ValueChanged<String>? onFieldSubmitted, List<TextInputFormatter>? inputFormatters, Radius? cursorRadius, Color? cursorColor, Brightness? keyboardAppearance, InputCounterWidgetBuilder? buildCounter, bool expands = false, int? minLines, bool? showCursor, VoidCallback? onTap, String? searchText, EdgeInsets? titlePadding, Text? dialogTitle, bool? isSearchable, String defaultSelectedCountryIsoCode = 'US', List<String>? priorityListByIsoCode, List<String>? countryFilterByIsoCode, TextStyle? dialogTextStyle, bool isCupertinoPicker = false, double? cupertinoPickerSheetHeight, TextAlignVertical? textAlignVertical, double pickerItemHeight = defaultPickerItemHeight, double pickerSheetHeight = defaultPickerSheetHeight, TextStyle? textStyle, double diameterRatio = 1.35, Color backgroundColor = const Color(0xFFD2D4DB), double offAxisFraction = 0.0, bool useMagnifier = false, double magnification = 1.0, Country? initialCountry, FixedExtentScrollController? scrollController, Comparator<Country>? sortComparator, List<Country>? priorityList, ItemBuilder? itemBuilder, Widget? iconSelector, Widget countryPicker(Widget flag, String countryCode)?, Widget? searchEmptyView})
Creates field for international phone number input.

Properties

autocorrect bool
final
autofocus bool
final
autovalidateMode AutovalidateMode
Used to enable/disable this form field auto validation and update its error text.
finalinherited
backgroundColor Color
Background color behind the children.
final
buildCounter InputCounterWidgetBuilder?
final
builder FormFieldBuilder<String>
Function that returns the widget representing this form field.
finalinherited
controller TextEditingController?
final
countryFilterByIsoCode List<String>?
final
countryPicker Widget Function(Widget flag, String countryCode)?
Country picker button
final
cupertinoPickerSheetHeight double?
final
cursorColor Color?
final
cursorRadius Radius?
final
cursorWidth double
final
decoration InputDecoration
finalinherited
defaultSelectedCountryIsoCode String
Default country iso code selected in dropdown
final
dialogTextStyle TextStyle?
final
dialogTitle Text?
final
diameterRatio double
Relative ratio between this picker's height and the simulated cylinder's diameter.
final
enabled bool
Whether the form is able to receive user input.
finalinherited
enableInteractiveSelection bool
final
errorBuilder FormFieldErrorBuilder?
Function that returns the widget representing the error to display.
finalinherited
expands bool
final
focusNode FocusNode?
An optional focus node to use as the focus node for this widget.
finalinherited
forceErrorText String?
An optional property that forces the FormFieldState into an error state by directly setting the FormFieldState.errorText property without running the validator function.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
iconSelector Widget?
Set a custom widget in left side of flag, (country selector)
final
initialCountry → Country?
final
initialValue String?
An optional value to initialize the form field to, or null otherwise.
finalinherited
inputFormatters List<TextInputFormatter>?
final
isCupertinoPicker bool
final
isSearchable bool?
final
itemBuilder → ItemBuilder?
Callback that is called with selected item of type Country which returns a Widget to build list view item inside dialog
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardAppearance Brightness?
final
keyboardType TextInputType
final
magnification double
final
maxLength int?
final
maxLengthEnforcement MaxLengthEnforcement
final
minLines int?
final
name String
Used to reference the field within the form, or to reference form data after the form is submitted.
finalinherited
obscureText bool
final
offAxisFraction double
final
onChanged ValueChanged<String?>?
Called when the field value is changed.
finalinherited
onEditingComplete VoidCallback?
final
onFieldSubmitted ValueChanged<String>?
final
onReset VoidCallback?
An optional method to call when the form field is reset via FormFieldState.reset.
finalinherited
onSaved FormFieldSetter<String>?
An optional method to call with the final value when the form is saved via FormState.save.
finalinherited
onTap VoidCallback?
final
pickerItemHeight double
The itemExtent of CupertinoPicker The uniform height of all children.
final
pickerSheetHeight double
The height of the picker
final
priorityList List<Country>?
List of countries that are placed on top
final
priorityListByIsoCode List<String>?
final
restorationId String?
Restoration ID to save and restore the state of the form field.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController FixedExtentScrollController?
A FixedExtentScrollController to read and control the current item.
final
scrollPadding EdgeInsets
final
searchEmptyView Widget?
View to display when search found no result
final
searchText String?
final
showCursor bool?
final
sortComparator Comparator<Country>?
Comparator to be used in sort of country list
final
strutStyle StrutStyle?
final
style TextStyle?
final
textAlign TextAlign
final
textAlignVertical TextAlignVertical?
final
textCapitalization TextCapitalization
final
textDirection TextDirection?
final
textInputAction TextInputAction?
final
textStyle TextStyle?
The TextStyle that is applied to Text widgets inside item
final
titlePadding EdgeInsets?
final
useMagnifier bool
final
validator FormFieldValidator<String>?
An optional method that validates an input. Returns an error string to display if the input is invalid, or null otherwise.
finalinherited
valueTransformer → ValueTransformer<String?>?
Called just before field value is saved. Used to massage data just before committing the value.
finalinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → FormBuilderFieldDecorationState<FormBuilderPhoneField, String>
Creates the mutable state for this widget at a given location in the tree.
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