PlacePicker constructor
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()?,
- CameraPositionCallback? onCameraMove,
- dynamic onCameraIdle()?,
- dynamic onMapTypeChanged(
- MapType
- bool zoomGesturesEnabled = true,
- bool zoomControlsEnabled = false,
Implementation
PlacePicker({
Key? key,
required this.apiKey,
this.onPlacePicked,
required this.initialPosition,
this.useCurrentLocation,
this.desiredLocationAccuracy = LocationAccuracy.high,
this.onMapCreated,
this.hintText,
this.searchingText,
this.selectText,
this.outsideOfPickAreaText,
this.onAutoCompleteFailed,
this.onGeocodingSearchFailed,
this.proxyBaseUrl,
this.httpClient,
this.selectedPlaceWidgetBuilder,
this.pinBuilder,
this.introModalWidgetBuilder,
this.autoCompleteDebounceInMilliseconds = 500,
this.cameraMoveDebounceInMilliseconds = 750,
this.initialMapType = MapType.normal,
this.enableMapTypeButton = true,
this.enableMyLocationButton = true,
this.myLocationButtonCooldown = 10,
this.usePinPointingSearch = true,
this.usePlaceDetailSearch = false,
this.autocompleteOffset,
this.autocompleteRadius,
this.autocompleteLanguage,
this.autocompleteComponents,
this.autocompleteTypes,
this.strictbounds,
this.region,
this.pickArea,
this.selectInitialPosition = false,
this.resizeToAvoidBottomInset = true,
this.initialSearchString,
this.searchForInitialValue = false,
this.forceSearchOnZoomChanged = false,
this.automaticallyImplyAppBarLeading = true,
this.autocompleteOnTrailingWhitespace = false,
this.hidePlaceDetailsWhenDraggingPin = true,
this.ignoreLocationPermissionErrors = false,
this.onTapBack,
this.onCameraMoveStarted,
this.onCameraMove,
this.onCameraIdle,
this.onMapTypeChanged,
this.zoomGesturesEnabled = true,
this.zoomControlsEnabled = false,
}) : super(key: key);