AddressAutocompleteTextFormField class

Inheritance

Constructors

AddressAutocompleteTextFormField({Key? key, String? mapsApiKey, PlacesApiVersion apiVersion = PlacesApiVersion.placesApiNew, PlaceApiProvider? placeApiProvider, String? androidPackageName, String? androidCertSha1Fingerprint, String? iosBundleId, TextEditingController? controller, bool requiredField = false, String? validator(String?)? = defaultValidator, Key? textFormFieldKey, ReportValidationFailureAndRequestFocusCallback? reportValidationFailAndRequestFocus, int debounceTime = 600, String prepareQuery(String address)?, void onClearClick()?, void onInitialSuggestionClick(Suggestion suggestion)?, void onSuggestionClick(Place place)?, void onFinishedEditingWithNoSuggestion(String text)?, String? onSuggestionClickGetTextToUseForControl(Place place)?, Widget buildItem(Suggestion, int)?, Color? hoverColor, Color? selectionColor, Icon? clearButton, BoxDecoration? suggestionsOverlayDecoration, double? elevation, double overlayOffset = 4, bool showGoogleTradeMark = false, bool? postalCodeLookup, AutoCompleteType? type, List<AutoCompleteType>? types, String? componentCountry, String? language, String? initialValue, FocusNode? focusNode, InputDecoration? decoration, TextInputType? keyboardType, TextCapitalization textCapitalization = TextCapitalization.none, TextInputAction? textInputAction, TextStyle? style, StrutStyle? strutStyle, TextDirection? textDirection, TextAlign textAlign = TextAlign.start, TextAlignVertical? textAlignVertical, bool autofocus = false, bool readOnly = false, bool? showCursor, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, bool enableSuggestions = true, MaxLengthEnforcement? maxLengthEnforcement, int? maxLines, int? minLines, bool expands = false, int? maxLength, ValueChanged<String>? onChanged, GestureTapCallback? onTap, TapRegionCallback? onTapOutside, VoidCallback? onEditingComplete, ValueChanged<String>? onFieldSubmitted, List<TextInputFormatter>? inputFormatters, bool? enabled, double cursorWidth = 2.0, double? cursorHeight, Radius? cursorRadius, Color? cursorColor, Brightness? keyboardAppearance, EdgeInsets scrollPadding = const EdgeInsets.all(20.0), bool? enableInteractiveSelection, TextSelectionControls? selectionControls, InputCounterWidgetBuilder? buildCounter, ScrollPhysics? scrollPhysics, Iterable<String>? autofillHints, AutovalidateMode? autovalidateMode, ScrollController? scrollController, bool enableIMEPersonalizedLearning = true, MouseCursor? mouseCursor, EditableTextContextMenuBuilder? contextMenuBuilder})
const

Properties

androidCertSha1Fingerprint → String?
Optional — the SHA-1 signing-certificate fingerprint registered for your Android app in the Google Cloud console, sent as X-Android-Cert.
final
androidPackageName → String?
Optional — your Android applicationId, sent as the X-Android-Package header so Android-app-restricted API keys work. Use together with androidCertSha1Fingerprint.
final
apiVersion → PlacesApiVersion
Which Google Places backend to use. Defaults to PlacesApiVersion.placesApiNew; pass PlacesApiVersion.legacy to keep using the legacy Places API on Google Cloud projects where it is still enabled. Ignored when placeApiProvider is supplied.
final
autofillHints → Iterable<String>?
final
autofocus → bool
final
autovalidateMode → AutovalidateMode?
final
buildCounter → InputCounterWidgetBuilder?
final
buildItem → Widget Function(Suggestion, int)?
builder used to render each item displayed must not be null
final
clearButton → Icon?
builder used to render a clear, it can be null, but in that case, a clear button is not displayed
final
componentCountry → String?
used to narrow down address search
final
contextMenuBuilder → EditableTextContextMenuBuilder?
final
controller → TextEditingController?
Specify the TextEditingController to use. Should be null if initialValue is specified.
final
cursorColor → Color?
final
cursorHeight → double?
final
cursorRadius → Radius?
final
cursorWidth → double
final
debounceTime → int
debounce time in milliseconds (default 600)
final
decoration → InputDecoration?
final
elevation → double?
Elevation for the suggestion list
final
enabled → bool?
final
enableIMEPersonalizedLearning → bool
final
enableInteractiveSelection → bool?
final
enableSuggestions → bool
final
expands → bool
final
focusNode → FocusNode?
final
hashCode → int
The hash code for this object.
no setterinherited
hoverColor → Color?
Hover color around buildItem widget on desktop platforms.
final
initialValue → String?
Specify the initialValue - this should be null if controller is specified.
final
inputFormatters → List<TextInputFormatter>?
final
iosBundleId → String?
Optional — your iOS bundle identifier, sent as X-Ios-Bundle-Identifier so iOS-app-restricted API keys work.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardAppearance → Brightness?
final
keyboardType → TextInputType?
final
language → String?
Inform Google places of desired language the results should be returned.
final
mapsApiKey → String?
Your Google Maps API key. Required unless placeApiProvider is supplied.
final
maxLength → int?
final
maxLengthEnforcement → MaxLengthEnforcement?
final
maxLines → int?
final
minLines → int?
final
mouseCursor → MouseCursor?
final
onChanged → ValueChanged<String>?
final
onClearClick → void Function()?
Callback triggered when user clicks clear icon. This can be useful if the caller wants to clear other address fields that may be in their form.
final
onEditingComplete → void Function()?
final
onFieldSubmitted → ValueChanged<String>?
final
onFinishedEditingWithNoSuggestion → ValueChanged<String>?
final
onInitialSuggestionClick → void Function(Suggestion suggestion)?
Callback triggered when a address item is selected, allows chance to clear other fields awaiting Place details in onSuggestionClick or to use the Suggestion information directly.
final
onSuggestionClick → void Function(Place place)?
Callback triggered when after Place has been retreived after item is selected
final
onSuggestionClickGetTextToUseForControl → String? Function(Place place)?
Callback triggered when a item is selected
final
onTap → void Function()?
final
onTapOutside → TapRegionCallback?
final
overlayOffset → double
Offset between the TextField and the Overlay
final
placeApiProvider → PlaceApiProvider?
Optional custom backend (native SDK wrapper, backend proxy, test fake). When supplied, apiVersion, mapsApiKey and the built-in providers are not used for API calls.
final
postalCodeLookup → bool?
(deprecated) PostalCode lookup instead of address lookup (defaults to false) (This has now been deprecated and replaced with type parameter type:AutoCompleteType.postalCode).
final
prepareQuery → String Function(String address)?
Callback triggered before sending query to google places API. This allows the caller to prepare the query, modifying it in any way. It might be used for adding things like City, State, Zip that may be already entered in other form elements.
final
readOnly → bool
final
reportValidationFailAndRequestFocus → ReportValidationFailureAndRequestFocusCallback?
final
requiredField → bool
Mark if this is a required field for basic validation.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scrollController → ScrollController?
final
scrollPadding → EdgeInsets
final
scrollPhysics → ScrollPhysics?
final
selectionColor → Color?
Selection color around buildItem widget on desktop platforms.
final
selectionControls → TextSelectionControls?
final
showCursor → bool?
final
showGoogleTradeMark → bool
if true, shows "powered by google" inside the suggestion list, after its items
final
smartDashesType → SmartDashesType?
final
smartQuotesType → SmartQuotesType?
final
strutStyle → StrutStyle?
final
style → TextStyle?
final
suggestionsOverlayDecoration → BoxDecoration?
BoxDecoration for the suggestions external container
final
textAlign → TextAlign
final
textAlignVertical → TextAlignVertical?
final
textCapitalization → TextCapitalization
final
textDirection → TextDirection?
final
textFormFieldKey → Key?
Key to use for the TextFormField() widget.
final
textInputAction → TextInputAction?
final
type → AutoCompleteType?
Single AutoCompleteType enum for type of information to autocomplete (Defaults to AutoCompleteType.address , use AutoCompleteType.postalCode for Zipcode lookup) This must be null if types is supplied
final
types → List<AutoCompleteType>?
Can be used as an alternative to type and allows a list of up to 5 AutoCompleteType enums to specify the types of autocomplete information to lookup. (Google places api only allows 5 types maximum) (type must not be supplied if types is used).
final
validator → String? Function(String?)?
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<StatefulWidget>
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

Static Methods

defaultValidator(String? testThisData) → String?