GoogleMapsWidget constructor
const
GoogleMapsWidget({
- Key? key,
- required String apiKey,
- required LatLng sourceLatLng,
- required LatLng destinationLatLng,
- void totalDistanceCallback()?,
- void totalTimeCallback()?,
- void onMapCreated()?,
- MarkerIconInfo? sourceMarkerIconInfo,
- MarkerIconInfo? destinationMarkerIconInfo,
- MarkerIconInfo? driverMarkerIconInfo,
- void onTapSourceMarker()?,
- void onTapDestinationMarker()?,
- void onTapDriverMarker()?,
- void onTapSourceInfoWindow()?,
- void onTapDestinationInfoWindow()?,
- void onTapDriverInfoWindow()?,
- Stream<
LatLng> ? driverCoordinatesStream, - LatLng? defaultCameraLocation,
- Set<
Marker> markers = const <Marker>{}, - Set<
Polyline> polylines = const <Polyline>{}, - bool showPolyline = true,
- bool showSourceMarker = true,
- bool showDestinationMarker = true,
- bool showDriverMarker = true,
- double defaultCameraZoom = Constants.DEFAULT_CAMERA_ZOOM,
- String sourceName = Constants.DEFAULT_SOURCE_NAME,
- String destinationName = Constants.DEFAULT_DESTINATION_NAME,
- String driverName = Constants.DEFAULT_DRIVER_NAME,
- Color routeColor = Constants.ROUTE_COLOR,
- int routeWidth = Constants.ROUTE_WIDTH,
- Set<
Factory< gestureRecognizers = const <Factory<OneSequenceGestureRecognizer>>{},OneSequenceGestureRecognizer> > - 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({
Key? key,
required this.apiKey,
required this.sourceLatLng,
required this.destinationLatLng,
this.totalDistanceCallback,
this.totalTimeCallback,
this.onMapCreated,
this.sourceMarkerIconInfo,
this.destinationMarkerIconInfo,
this.driverMarkerIconInfo,
this.onTapSourceMarker,
this.onTapDestinationMarker,
this.onTapDriverMarker,
this.onTapSourceInfoWindow,
this.onTapDestinationInfoWindow,
this.onTapDriverInfoWindow,
this.driverCoordinatesStream,
this.defaultCameraLocation,
this.markers = const <Marker>{},
this.polylines = const <Polyline>{},
this.showPolyline = true,
this.showSourceMarker = true,
this.showDestinationMarker = true,
this.showDriverMarker = true,
this.defaultCameraZoom = Constants.DEFAULT_CAMERA_ZOOM,
this.sourceName = Constants.DEFAULT_SOURCE_NAME,
this.destinationName = Constants.DEFAULT_DESTINATION_NAME,
this.driverName = Constants.DEFAULT_DRIVER_NAME,
this.routeColor = Constants.ROUTE_COLOR,
this.routeWidth = Constants.ROUTE_WIDTH,
// other google maps params
this.gestureRecognizers = const <Factory<OneSequenceGestureRecognizer>>{},
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,
}) : super(key: key);