UFUPlacePicker class
Constructors
UFUPlacePicker ({Key ? key , LocationAccuracy desiredAccuracy = LocationAccuracy.high , required String apiKey , String ? geoCodingBaseUrl , Client? geoCodingHttpClient , String ? language , List <String > locationType = const [] , List <String > resultType = const [] , MinMaxZoomPreference minMaxZoomPreference = const MinMaxZoomPreference(0, 16) , EdgeInsets padding = const EdgeInsets.all(0) , bool compassEnabled = true , bool liteModeEnabled = false , EdgeInsetsGeometry topCardMargin = const EdgeInsets.all(8) , Color ? topCardColor , ShapeBorder topCardShape = const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(12))) , BorderRadiusGeometry borderRadius = const BorderRadius.all(Radius.circular(12)) , String searchHintText = "Start typing to search" , ShapeBorder bottomCardShape = const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(12))) , EdgeInsetsGeometry bottomCardMargin = const EdgeInsets.fromLTRB(8, 8, 8, 16) , Icon bottomCardIcon = const Icon(Icons.send) , String bottomCardTooltip = "Continue with this location" , Color ? bottomCardColor , bool hasLocationPermission = true , dynamic getLocation ()?, dynamic onSuggestionSelected (PlacesDetailsResponse? )?, dynamic onNext (GeocodingResult? )?, LatLng? currentLatLng = const LatLng(40.741895, -73.989308) , bool hideBackButton = false , bool popOnNextButtonTaped = false , Widget ? backButton , bool hideMoreOptions = false , String dialogTitle = 'You can also use the following options' , Client? placesHttpClient , String ? placesBaseUrl , String ? sessionToken , num ? offset , Location? origin , Location? location , num ? radius , String ? region , List <String > fields = const [] , List <String > types = const [] , List <Component > components = const [] , bool strictbounds = false , MapType mapType = MapType.normal , bool hideSearchBar = false , TextEditingController ? searchController , Map <String , LatLng > ? additionalMarkers , String ? assetsMarkerIcon , bool bottom = true , bool left = true , bool maintainBottomViewPadding = false , EdgeInsets minimum = EdgeInsets.zero , bool right = true , bool top = true , bool hideLocationButton = false , bool hideMapTypeButton = false , bool hideBottomCard = false , dynamic onDecodeAddress (GeocodingResult? , {bool ? isFromSearch })?, FocusNode ? focusNode , String ? mapStyle , String fabTooltip = 'My Location' , IconData fabIcon = Icons.my_location , int minCharsForSuggestions = 0 , bool buildingsEnabled = true , CameraTargetBounds cameraTargetBounds = CameraTargetBounds.unbounded , Set <Circle > circles = const <Circle>{} , String ? cloudMapId , bool fortyFiveDegreeImageryEnabled = false , Set <Factory <OneSequenceGestureRecognizer > > gestureRecognizers = const <Factory<OneSequenceGestureRecognizer>>{} , bool indoorViewEnabled = false , TextDirection ? layoutDirection , bool mapToolbarEnabled = true , VoidCallback ? onCameraIdle , VoidCallback ? onCameraMoveStarted , ArgumentCallback<LatLng > ? onLongPress , Set <Polygon > polygons = const <Polygon>{} , Set <Polyline > polylines = const <Polyline>{} , bool rotateGesturesEnabled = true , bool scrollGesturesEnabled = true , Set <TileOverlay > tileOverlays = const <TileOverlay>{} , bool tiltGesturesEnabled = true , bool trafficEnabled = true , WebGestureHandling? webGestureHandling , bool zoomGesturesEnabled = true , InputDecoration ? decoration , Widget ? bottomCardBuilder (BuildContext context , GeocodingResult? result , String address )?, Duration debounceDuration = const Duration(milliseconds: 500) })
const
Properties
additionalMarkers
→ Map <String , LatLng > ?
Add your own custom markers
final
apiKey
→ String
API key for the map & places
final
assetsMarkerIcon
→ String ?
Add your own custom markers icon
final
backButton
→ Widget ?
Back button replacement when hideBackButton is false and backButton is not null
final
borderRadius
→ BorderRadiusGeometry
Top card text field border radius
final
bottom
→ bool
Safe area parameters (default: true)
final
bottomCardBuilder
→ Widget ? Function(BuildContext context , GeocodingResult? result , String address ) ?
final
bottomCardColor
→ Color ?
Bottom card color
final
bottomCardIcon
→ Icon
Bottom card icon
final
bottomCardMargin
→ EdgeInsetsGeometry
Bottom card margin
final
bottomCardShape
→ ShapeBorder
Bottom card shape
final
bottomCardTooltip
→ String
Bottom card tooltip
final
buildingsEnabled
→ bool
Enables or disables showing 3D buildings where available
final
cameraTargetBounds
→ CameraTargetBounds
Geographical bounding box for the camera target.
final
circles
→ Set <Circle >
Circles to be placed on the map.
final
cloudMapId
→ String ?
Identifier that's associated with a specific cloud-based map style.
final
compassEnabled
→ bool
Compass for the map (default: true)
final
components
→ List <Component >
Components set results to be restricted to a specific area
components: Component(Component.country, "us")
final
currentLatLng
→ LatLng?
currentLatLng init location for camera position
currentLatLng: Location(lat: 40.7128, lng: 74.0060),
final
debounceDuration
→ Duration
Duration for search debounce in milliseconds
final
decoration
→ InputDecoration ?
final
desiredAccuracy
→ LocationAccuracy
GPS accuracy for the map
final
dialogTitle
→ String
Dialog title
final
fabIcon
→ IconData
FAB icon
final
fabTooltip
→ String
Tooltip for the FAB button.
final
fields
→ List <String >
List of fields to be returned by the Google Maps Places API.
Refer to the Google Documentation here for a list of valid values: https://developers.google.cn/maps/documentation/places/web-service/details
final
focusNode
→ FocusNode ?
Focus node for the search text field
final
fortyFiveDegreeImageryEnabled
→ bool
True if 45 degree imagery should be enabled. Web only.
final
GeoCoding api headers
final
geoCodingBaseUrl
→ String ?
GeoCoding base url
final
geoCodingHttpClient
→ Client?
GeoCoding http client
final
gestureRecognizers
→ Set <Factory <OneSequenceGestureRecognizer > >
Which gestures should be consumed by the map.
final
getLocation
→ dynamic Function() ?
detect location button click callback
final
hashCode
→ int
The hash code for this object.
no setter inherited
hasLocationPermission
→ bool
On location permission callback
final
hideBackButton
→ bool
Show back button (default: true)
final
hideBottomCard
→ bool
hide bottom card (default: false)
final
hideLocationButton
→ bool
hide location button and map type button (default: false)
final
hideMapTypeButton
→ bool
final
hideMoreOptions
→ bool
Show more suggestions
final
hideSearchBar
→ bool
Hide top search bar (default: false)
final
indoorViewEnabled
→ bool
Enables or disables the indoor view from the map
final
key
→ Key ?
Controls how one widget replaces another widget in the tree.
final inherited
language
→ String ?
Language code for Places API results
language: 'en',
final
layoutDirection
→ TextDirection ?
The layout direction to use for the embedded view.
final
left
→ bool
final
liteModeEnabled
→ bool
Lite mode for the map (default: false)
final
location
→ Location?
Location bounds for restricting results to a radius around a location
location: Location(lat: 40.741895, lng: -73.989308)
final
locationType
→ List <String >
GeoCoding location type
final
maintainBottomViewPadding
→ bool
final
mapStyle
→ String ?
Map styles, you can style a map to be dark or light, see more at
https://stackoverflow.com/questions/49953913/flutter-styled-map and see here to create a json
styling and load it from assets as a string https://mapstyle.withgoogle.com
final
mapToolbarEnabled
→ bool
True if the map should show a toolbar when you interact with the map. Android only.
final
mapType
→ MapType
Map type (default: MapType.normal)
final
minCharsForSuggestions
→ int
Minimum number of characters to trigger the autocomplete
Defaults to 0
final
minimum
→ EdgeInsets
final
minMaxZoomPreference
→ MinMaxZoomPreference
Map minimum zoom level & maximum zoom level
final
offset
→ num ?
Offset for pagination of results
offset: int,
final
onCameraIdle
→ VoidCallback ?
Called when camera movement has ended, there are no pending
animations and the user has stopped interacting with the map.
final
onCameraMoveStarted
→ VoidCallback ?
Called when the camera starts moving.
final
onDecodeAddress
→ dynamic Function(GeocodingResult? , {bool ? isFromSearch }) ?
When tap on map decode address callback function
final
onLongPress
→ ArgumentCallback<LatLng > ?
Called every time a GoogleMap is long pressed.
final
onNext
→ dynamic Function(GeocodingResult? ) ?
On Next Page callback
final
onSuggestionSelected
→ dynamic Function(PlacesDetailsResponse? ) ?
On Suggestion Selected callback
final
origin
→ Location?
Origin location for calculating distance from results
origin: Location(lat: -33.852, lng: 151.211),
final
padding
→ EdgeInsets
Padding around the map
final
apiHeader is used to add headers to the request.
final
placesBaseUrl
→ String ?
baseUrl is used to build the url for the request.
final
placesHttpClient
→ Client?
httpClient is used to make network requests.
final
polygons
→ Set <Polygon >
Polygons to be placed on the map.
final
polylines
→ Set <Polyline >
Polylines to be placed on the map.
final
popOnNextButtonTaped
→ bool
Popup route on next press (default: false)
final
radius
→ num ?
Radius for restricting results to a radius around a location
radius: Radius in meters
final
region
→ String ?
Region for restricting results to a set of regions
region: "us"
final
resultType
→ List <String >
GeoCoding result type
final
right
→ bool
final
rotateGesturesEnabled
→ bool
True if the map view should respond to rotate gestures.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
scrollGesturesEnabled
→ bool
True if the map view should respond to scroll gestures.
final
searchController
→ TextEditingController ?
Search text field controller
final
searchHintText
→ String
Top card text field hint text
final
sessionToken
→ String ?
Session token for Google Places API
final
strictbounds
→ bool
Bounds for restricting results to a set of bounds
final
tileOverlays
→ Set <TileOverlay >
Tile overlays to be placed on the map.
final
tiltGesturesEnabled
→ bool
True if the map view should respond to tilt gestures.
final
top
→ bool
final
topCardColor
→ Color ?
Top card color
final
topCardMargin
→ EdgeInsetsGeometry
Top card margin
final
topCardShape
→ ShapeBorder
Top card shape
final
trafficEnabled
→ bool
Enables or disables the traffic layer of the map
final
types
→ List <String >
Types for restricting results to a set of place types
final
webGestureHandling
→ WebGestureHandling?
This setting controls how the API handles gestures on the map. Web only.
final
zoomGesturesEnabled
→ bool
True if the map view should respond to zoom gestures.
final