google_maps_helper 1.0.0 copy "google_maps_helper: ^1.0.0" to clipboard
google_maps_helper: ^1.0.0 copied to clipboard

A simplified flutter package solution that extends google_maps_flutter with essential functionalities, including autocomplete place search and polyline drawing.

A simplified flutter package solution that extends google_maps_flutter with essential functionalities, including autocomplete place search and polyline drawing.

Features #

  • All Google map features in one package
  • Auto-complete text field for Google places
  • Draw polylines on Google map
  • No need for separate google_maps_flutter package
  • Easy to use & highly customizable

google_maps_helper screenshot

Getting started #

Checkout google_maps_flutter setup instructions.

Usage #

Auto-complete text field for Google places #

  Widget get _searchField {
    return GmhSearchField(
      initialValue: _address,
      onSelected: (data) => _address = data,
      searchParams: GmhSearchParams(
        placesApiKey: '<GOOGLE_PLACES_API_KEY>',
      ),
    );
  }

Google map widget #

GoogleMapController? _controller;
final _kSrc = CameraPosition(
    target: LatLng(37.4165849896396, -122.08051867783071),
);
final _kDest = CameraPosition(
    target: LatLng(37.420921119071586, -122.08535335958004),
);

GmhMap(
    mapOptions: GmhMapOptions(
        initialCameraPosition: _kSrc,
        onMapCreated: (controller) => _controller = controller,
        markers: {
            Marker(
                position: _kSrc.target,
                markerId: MarkerId('src'),
            ),
            Marker(
                position: _kDest.target,
                markerId: MarkerId('dest'),
            ),
        },
    ),
    polylineOptions: GmhPolylineOptions(
        geodesic: true,
        color: Colors.blue,
        apiKey: '<GOOGLE_DIRECTIONS_API_KEY>',
    ),
),

Additional information #

Think you've found a bug, or would like to see a new feature? We'd love to hear about it! Visit the Issues section of the git repository.

7
likes
0
points
59
downloads

Publisher

verified publishervalueoutput.com

Weekly Downloads

A simplified flutter package solution that extends google_maps_flutter with essential functionalities, including autocomplete place search and polyline drawing.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, google_maps_flutter, http

More

Packages that depend on google_maps_helper