maps_place_picker library

A Google Maps place-picker widget for Flutter.

Provides PlacePicker, a full-screen widget that lets users search for and select a location using the Google Maps Places API (New) and Geocoding API.

Quick start:

Navigator.push(
  context,
  MaterialPageRoute(
    builder: (_) => PlacePicker(
      apiKey: 'YOUR_API_KEY',
      initialPosition: LatLng(-23.5505, -46.6333),
      onPlacePicked: (result) => print(result.formattedAddress),
    ),
  ),
);

Classes

AddressComponent
A component of a formatted address, as returned by the Places / Geocoding APIs.
Bounds
A bounding box defined by a north-east and south-west corner.
CircleArea
A circular area on the map used to restrict the pickable region.
Component
A filter component that can be passed to PlacePicker.autocompleteComponents to restrict or bias autocomplete results.
FloatingCard
A positioned card that floats over the map at a specified location.
Geometry
Location geometry as returned by the Places / Geocoding APIs.
Location
Geographic coordinates returned by the Places and Geocoding APIs.
OpeningHoursDetail
Opening hours information for a place.
OpeningHoursPeriod
Opening hours period for a single day.
OpeningHoursPoint
A day-of-week and time-of-day point in an opening hours period.
Photo
Photo associated with a place.
PickResult
The result returned when the user picks a location in PlacePicker.
PlaceDetails
Detailed information about a place as returned by the Places API (New).
PlacePicker
A full-screen widget that lets users search for and select a location.
Review
A user-contributed review of a place.
RoundedFrame
A container with rounded corners and an optional Material elevation.

Enums

PinState
Visual state of the draggable map pin.
PriceLevel
Price level of a place, as returned by the Places API (New).
SearchingState
Whether a place search is currently in flight.

Functions

parsePriceLevel(String? value) PriceLevel
Parses the Places API (New) string price level into a PriceLevel.

Typedefs

IntroModalWidgetBuilder = Widget Function(BuildContext context, Function? close)
Signature for a builder that creates an intro modal overlay.