GoogleMapsWidget constructor
const
GoogleMapsWidget({
- Key? key,
- required String apiKey,
- required LatLng sourceLatLng,
- required LatLng destinationLatLng,
- void totalDistanceCallback()?,
- void totalTimeCallback()?,
- void onMapCreated()?,
- MarkerIconInfo sourceMarkerIconInfo = const MarkerIconInfo(),
- MarkerIconInfo destinationMarkerIconInfo = const MarkerIconInfo(),
- MarkerIconInfo driverMarkerIconInfo = const MarkerIconInfo(),
- Stream<
LatLng> ? driverCoordinatesStream, - LatLng? defaultCameraLocation,
- void onPolylineUpdate()?,
- Set<
Marker> markers = const <Marker>{}, - Set<
Polyline> polylines = const <Polyline>{}, - bool showPolyline = true,
- double defaultCameraZoom = Constants.kDefaultCameraZoom,
- Color routeColor = Constants.kRouteColor,
- int routeWidth = Constants.kRouteWidth,
- bool updatePolylinesOnDriverLocUpdate = true,
- Set<
Factory< gestureRecognizers = const <Factory<OneSequenceGestureRecognizer>>{},OneSequenceGestureRecognizer> > - TextDirection? layoutDirection,
- bool compassEnabled = true,
- bool mapToolbarEnabled = true,
- CameraTargetBounds cameraTargetBounds = CameraTargetBounds.unbounded,
- MapType mapType = MapType.normal,
- MinMaxZoomPreference minMaxZoomPreference = MinMaxZoomPreference.unbounded,
- bool rotateGesturesEnabled = true,
- bool scrollGesturesEnabled = true,
- bool zoomControlsEnabled = true,
- bool zoomGesturesEnabled = true,
- bool liteModeEnabled = false,
- bool tiltGesturesEnabled = true,
- bool myLocationEnabled = false,
- bool myLocationButtonEnabled = true,
- EdgeInsets padding = const EdgeInsets.all(0),
- bool indoorViewEnabled = false,
- bool trafficEnabled = false,
- bool buildingsEnabled = true,
- Set<
Polygon> polygons = const <Polygon>{}, - Set<
Circle> circles = const <Circle>{}, - VoidCallback? onCameraMoveStarted,
- Set<
TileOverlay> tileOverlays = const <TileOverlay>{}, - CameraPositionCallback? onCameraMove,
- VoidCallback? onCameraIdle,
- ArgumentCallback<
LatLng> ? onTap, - ArgumentCallback<
LatLng> ? onLongPress,
Implementation
const GoogleMapsWidget({
super.key,
required this.apiKey,
required this.sourceLatLng,
required this.destinationLatLng,
this.totalDistanceCallback,
this.totalTimeCallback,
this.onMapCreated,
this.sourceMarkerIconInfo = const MarkerIconInfo(),
this.destinationMarkerIconInfo = const MarkerIconInfo(),
this.driverMarkerIconInfo = const MarkerIconInfo(),
this.driverCoordinatesStream,
this.defaultCameraLocation,
this.onPolylineUpdate,
this.markers = const <Marker>{},
this.polylines = const <Polyline>{},
this.showPolyline = true,
this.defaultCameraZoom = Constants.kDefaultCameraZoom,
this.routeColor = Constants.kRouteColor,
this.routeWidth = Constants.kRouteWidth,
this.updatePolylinesOnDriverLocUpdate = true,
// other google maps params
this.gestureRecognizers = const <Factory<OneSequenceGestureRecognizer>>{},
this.layoutDirection,
this.compassEnabled = true,
this.mapToolbarEnabled = true,
this.cameraTargetBounds = CameraTargetBounds.unbounded,
this.mapType = MapType.normal,
this.minMaxZoomPreference = MinMaxZoomPreference.unbounded,
this.rotateGesturesEnabled = true,
this.scrollGesturesEnabled = true,
this.zoomControlsEnabled = true,
this.zoomGesturesEnabled = true,
this.liteModeEnabled = false,
this.tiltGesturesEnabled = true,
this.myLocationEnabled = false,
this.myLocationButtonEnabled = true,
this.padding = const EdgeInsets.all(0),
this.indoorViewEnabled = false,
this.trafficEnabled = false,
this.buildingsEnabled = true,
this.polygons = const <Polygon>{},
this.circles = const <Circle>{},
this.onCameraMoveStarted,
this.tileOverlays = const <TileOverlay>{},
this.onCameraMove,
this.onCameraIdle,
this.onTap,
this.onLongPress,
});