PlacePicker class

Inheritance

Constructors

PlacePicker({Key? key, required String apiKey, ValueChanged<PickResult>? onPlacePicked, required LatLng initialPosition, bool? useCurrentLocation, LocationAccuracy desiredLocationAccuracy = LocationAccuracy.high, MapCreatedCallback? onMapCreated, String? hintText, String? searchingText, String? selectText, String? outsideOfPickAreaText, ValueChanged<String>? onAutoCompleteFailed, ValueChanged<String>? onGeocodingSearchFailed, String? proxyBaseUrl, BaseClient? httpClient, SelectedPlaceWidgetBuilder? selectedPlaceWidgetBuilder, PinBuilder? pinBuilder, IntroModalWidgetBuilder? introModalWidgetBuilder, int autoCompleteDebounceInMilliseconds = 500, int cameraMoveDebounceInMilliseconds = 750, MapType initialMapType = MapType.normal, bool enableMapTypeButton = true, bool enableMyLocationButton = true, int myLocationButtonCooldown = 10, bool usePinPointingSearch = true, bool usePlaceDetailSearch = false, num? autocompleteOffset, num? autocompleteRadius, String? autocompleteLanguage, List<Component>? autocompleteComponents, List<String>? autocompleteTypes, bool? strictbounds, String? region, CircleArea? pickArea, bool selectInitialPosition = false, bool resizeToAvoidBottomInset = true, String? initialSearchString, bool searchForInitialValue = false, bool forceSearchOnZoomChanged = false, bool automaticallyImplyAppBarLeading = true, bool autocompleteOnTrailingWhitespace = false, bool hidePlaceDetailsWhenDraggingPin = true, bool ignoreLocationPermissionErrors = false, VoidCallback? onTapBack, dynamic onCameraMoveStarted(PlaceProvider)?, CameraPositionCallback? onCameraMove, dynamic onCameraIdle(PlaceProvider)?, dynamic onMapTypeChanged(MapType)?, bool zoomGesturesEnabled = true, bool zoomControlsEnabled = false})

Properties

apiKey String
final
autocompleteComponents List<Component>?
final
autoCompleteDebounceInMilliseconds int
final
autocompleteLanguage String?
final
autocompleteOffset num?
final
autocompleteOnTrailingWhitespace bool
Will perform an autocomplete search, if set to true. Note that setting this to true, while providing a smoother UX experience, may cause additional unnecessary queries to the Places API.
final
autocompleteRadius num?
final
autocompleteTypes List<String>?
final
automaticallyImplyAppBarLeading bool
Whether to display appbar backbutton. Defaults to true.
final
cameraMoveDebounceInMilliseconds int
final
desiredLocationAccuracy → LocationAccuracy
final
enableMapTypeButton bool
final
enableMyLocationButton bool
final
forceSearchOnZoomChanged bool
Allow searching place when zoom has changed. By default searching is disabled when zoom has changed in order to prevent unwilling API usage.
final
hashCode int
The hash code for this object.
no setterinherited
hidePlaceDetailsWhenDraggingPin bool
Whether to hide place details when dragging pin. Defaults to true.
final
hintText String?
final
httpClient → BaseClient?
optional - set 'client' value in google_maps_webservice
final
ignoreLocationPermissionErrors bool
Whether to ignore location permission errors. Defaults to false. If this is set to true the UI will be blocked.
final
initialMapType → MapType
final
initialPosition → LatLng
final
initialSearchString String?
Initial value of autocomplete search
final
introModalWidgetBuilder IntroModalWidgetBuilder?
optional - builds customized introduction panel.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
myLocationButtonCooldown int
final
onAutoCompleteFailed ValueChanged<String>?
final
onCameraIdle → (dynamic Function(PlaceProvider)?)
Called when camera movement has ended, there are no pending animations and the user has stopped interacting with the map.
final
onCameraMove → CameraPositionCallback?
Called repeatedly as the camera continues to move after an onCameraMoveStarted call.
final
onCameraMoveStarted → (dynamic Function(PlaceProvider)?)
Called when the camera starts moving.
final
onGeocodingSearchFailed ValueChanged<String>?
final
onMapCreated → MapCreatedCallback?
GoogleMap pass-through events: Callback method for when the map is ready to be used.
final
onMapTypeChanged → (dynamic Function(MapType)?)
Called when the map type has been changed.
final
onPlacePicked ValueChanged<PickResult>?
By using default setting of Place Picker, it will result result when user hits the select here button.
final
onTapBack VoidCallback?
final
outsideOfPickAreaText String?
final
pickArea CircleArea?
If set the picker can only pick addresses in the given circle area. The section will be highlighted.
final
pinBuilder → PinBuilder?
optional - builds customized pin widget which indicates current pointing position.
final
proxyBaseUrl String?
optional - sets 'proxy' value in google_maps_webservice
final
region String?
final
resizeToAvoidBottomInset bool
If true the body and the scaffold's floating widgets should size themselves to avoid the onscreen keyboard whose height is defined by the ambient MediaQuery's MediaQueryData.viewInsets bottom property.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchForInitialValue bool
Whether to search for the initial value or not
final
searchingText String?
final
selectedPlaceWidgetBuilder → SelectedPlaceWidgetBuilder?
optional - builds selected place's UI
final
selectInitialPosition bool
final
selectText String?
final
strictbounds bool?
final
useCurrentLocation bool?
final
usePinPointingSearch bool
final
usePlaceDetailSearch bool
final
zoomControlsEnabled bool
Allow user to make visible the zoom button
final
zoomGesturesEnabled bool
Toggle on & off zoom gestures
final

Methods

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