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,
- ValueChanged<
String> ? onAutoCompleteFailed, - ValueChanged<
String> ? onGeocodingSearchFailed, - String? proxyBaseUrl,
- BaseClient? httpClient,
- SelectedPlaceWidgetBuilder? selectedPlaceWidgetBuilder,
- PinBuilder? pinBuilder,
- 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,
- bool selectInitialPosition = false,
- bool resizeToAvoidBottomInset = true,
- String? initialSearchString,
- bool searchForInitialValue = false,
- bool forceAndroidLocationManager = false,
- bool forceSearchOnZoomChanged = false,
- bool automaticallyImplyAppBarLeading = true,
- bool autocompleteOnTrailingWhitespace = false,
- bool hidePlaceDetailsWhenDraggingPin = true,
- Widget? icon,
- Color? iconColor,
- Widget? label,
- String? labelText,
- TextStyle? labelStyle,
- TextStyle? floatingLabelStyle,
- String? helperText,
- TextStyle? helperStyle,
- int? helperMaxLines,
- TextStyle? hintStyle,
- TextDirection? hintTextDirection,
- int? hintMaxLines,
- String? errorText,
- TextStyle? errorStyle,
- int? errorMaxLines,
- FloatingLabelBehavior? floatingLabelBehavior,
- FloatingLabelAlignment? floatingLabelAlignment,
- bool isCollapsed = false,
- bool? isDense,
- Widget? prefixIcon,
- BoxConstraints? prefixIconConstraints,
- Widget? prefix,
- String? prefixText,
- TextStyle? prefixStyle,
- Color? prefixIconColor,
- Widget? suffixIcon,
- Widget? suffix,
- String? suffixText,
- TextStyle? suffixStyle,
- Color? suffixIconColor,
- BoxConstraints? suffixIconConstraints,
- Widget? counter,
- String? counterText,
- TextStyle? counterStyle,
- bool? filled,
- Color? fillColor,
- Color? focusColor,
- Color? hoverColor,
- InputBorder? errorBorder,
- InputBorder? focusedBorder,
- InputBorder? focusedErrorBorder,
- InputBorder? disabledBorder,
- InputBorder? enabledBorder,
- InputBorder? border,
- bool enabled = true,
- String? semanticCounterText,
- bool? alignLabelWithHint,
- BoxConstraints? constraints,
- double? height,
- BorderRadiusGeometry? borderRadius,
- bool isInScaffoldBodyAndHasAppBar = true,
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.searchBarHeight,
// this.contentPadding,
this.onAutoCompleteFailed,
this.onGeocodingSearchFailed,
this.proxyBaseUrl,
this.httpClient,
this.selectedPlaceWidgetBuilder,
this.pinBuilder,
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.selectInitialPosition = false,
this.resizeToAvoidBottomInset = true,
this.initialSearchString,
this.searchForInitialValue = false,
this.forceAndroidLocationManager = false,
this.forceSearchOnZoomChanged = false,
this.automaticallyImplyAppBarLeading = true,
this.autocompleteOnTrailingWhitespace = false,
this.hidePlaceDetailsWhenDraggingPin = true,
this.icon,
this.iconColor,
this.label,
this.labelText,
this.labelStyle,
this.floatingLabelStyle,
this.helperText,
this.helperStyle,
this.helperMaxLines,
this.hintStyle,
this.hintTextDirection,
this.hintMaxLines,
this.errorText,
this.errorStyle,
this.errorMaxLines,
this.floatingLabelBehavior,
this.floatingLabelAlignment,
this.isCollapsed = false,
this.isDense,
this.prefixIcon,
this.prefixIconConstraints,
this.prefix,
this.prefixText,
this.prefixStyle,
this.prefixIconColor,
this.suffixIcon,
this.suffix,
this.suffixText,
this.suffixStyle,
this.suffixIconColor,
this.suffixIconConstraints,
this.counter,
this.counterText,
this.counterStyle,
this.filled,
this.fillColor,
this.focusColor,
this.hoverColor,
this.errorBorder,
this.focusedBorder,
this.focusedErrorBorder,
this.disabledBorder,
this.enabledBorder,
this.border,
this.enabled = true,
this.semanticCounterText,
this.alignLabelWithHint,
this.constraints,
this.height,
this.borderRadius,
this.isInScaffoldBodyAndHasAppBar = true,
}) : super(key: key);