google_maps_widget
2.0.0, released 3 months ago by rithikbhandari.dev
Flutter widget to draw routes between source and destination and track driver location.
What it does
Provides a Google Maps widget capable of fetching routes using the Google Routes API, drawing custom polylines, and handling real-time driver location updates and marker customizations.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display a route or polyline between two geographical locations on Google Maps.
- You are building a delivery or ride-sharing app that tracks a driver's real-time location.
Skip it when
- You are using mapping libraries other than Google Maps, such as Flutter Map.
- You do not want to configure Google Cloud API keys and billing.
Strengths
- Simplifies route drawing and driver tracking compared to using raw google_maps_flutter.
- Supports both declarative coordinate updates and imperative controller methods.
- Passes through almost all GoogleMap parameters.
Weaknesses
- Requires manual setup of API keys and specific Google Cloud APIs across Android, iOS, and Web.
- Tied exclusively to Google Maps.
Setup
- Kind
- Flutter widgets
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 2
Requires obtaining a Google Maps API key, enabling Maps SDK for Android/iOS, Maps JavaScript API, and the Routes API, plus platform-specific manifest/delegate configuration.
GoogleMapsWidget(
apiKey: "PASTE_GOOGLE_MAPS_API_KEY_HERE",
sourceLatLng: LatLng(40.484000837597925, -3.369978368282318),
destinationLatLng: LatLng(40.48017307700204, -3.3618026599287987),
)Alternatives
Packages that do the same job and could replace google_maps_widget.
- flutter_map
If you prefer using OpenStreetMap tiles instead of Google Maps.
90Compare
Works with
Packages commonly used together with google_maps_widget: ones it builds on, ones built on it, and its own family.