GoogleMapsWidget constructor

const GoogleMapsWidget({
  1. Key? key,
  2. required String apiKey,
  3. required LatLng sourceLatLng,
  4. required LatLng destinationLatLng,
  5. void totalDistanceCallback(
    1. String?
    )?,
  6. void totalTimeCallback(
    1. String?
    )?,
  7. void onMapCreated(
    1. GoogleMapController
    )?,
  8. MarkerIconInfo sourceMarkerIconInfo = const MarkerIconInfo(),
  9. MarkerIconInfo destinationMarkerIconInfo = const MarkerIconInfo(),
  10. MarkerIconInfo driverMarkerIconInfo = const MarkerIconInfo(),
  11. Stream<LatLng>? driverCoordinatesStream,
  12. LatLng? defaultCameraLocation,
  13. void onPolylineUpdate(
    1. Polyline
    )?,
  14. Set<Marker> markers = const <Marker>{},
  15. Set<Polyline> polylines = const <Polyline>{},
  16. bool showPolyline = true,
  17. double defaultCameraZoom = Constants.kDefaultCameraZoom,
  18. Color routeColor = Constants.kRouteColor,
  19. int routeWidth = Constants.kRouteWidth,
  20. bool updatePolylinesOnDriverLocUpdate = true,
  21. Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers = const <Factory<OneSequenceGestureRecognizer>>{},
  22. TextDirection? layoutDirection,
  23. bool compassEnabled = true,
  24. bool mapToolbarEnabled = true,
  25. CameraTargetBounds cameraTargetBounds = CameraTargetBounds.unbounded,
  26. MapType mapType = MapType.normal,
  27. MinMaxZoomPreference minMaxZoomPreference = MinMaxZoomPreference.unbounded,
  28. bool rotateGesturesEnabled = true,
  29. bool scrollGesturesEnabled = true,
  30. bool zoomControlsEnabled = true,
  31. bool zoomGesturesEnabled = true,
  32. bool liteModeEnabled = false,
  33. bool tiltGesturesEnabled = true,
  34. bool myLocationEnabled = false,
  35. bool myLocationButtonEnabled = true,
  36. EdgeInsets padding = const EdgeInsets.all(0),
  37. bool indoorViewEnabled = false,
  38. bool trafficEnabled = false,
  39. bool buildingsEnabled = true,
  40. Set<Polygon> polygons = const <Polygon>{},
  41. Set<Circle> circles = const <Circle>{},
  42. VoidCallback? onCameraMoveStarted,
  43. Set<TileOverlay> tileOverlays = const <TileOverlay>{},
  44. CameraPositionCallback? onCameraMove,
  45. VoidCallback? onCameraIdle,
  46. ArgumentCallback<LatLng>? onTap,
  47. 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 = 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,
}) : super(key: key);