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,
  9. MarkerIconInfo? destinationMarkerIconInfo,
  10. MarkerIconInfo? driverMarkerIconInfo,
  11. void onTapSourceMarker(
    1. LatLng
    )?,
  12. void onTapDestinationMarker(
    1. LatLng
    )?,
  13. void onTapDriverMarker(
    1. LatLng
    )?,
  14. void onTapSourceInfoWindow(
    1. LatLng
    )?,
  15. void onTapDestinationInfoWindow(
    1. LatLng
    )?,
  16. void onTapDriverInfoWindow(
    1. LatLng
    )?,
  17. Stream<LatLng>? driverCoordinatesStream,
  18. LatLng? defaultCameraLocation,
  19. Set<Marker> markers = const <Marker>{},
  20. Set<Polyline> polylines = const <Polyline>{},
  21. bool showPolyline = true,
  22. bool showSourceMarker = true,
  23. bool showDestinationMarker = true,
  24. bool showDriverMarker = true,
  25. double defaultCameraZoom = Constants.DEFAULT_CAMERA_ZOOM,
  26. String sourceName = Constants.DEFAULT_SOURCE_NAME,
  27. String destinationName = Constants.DEFAULT_DESTINATION_NAME,
  28. String driverName = Constants.DEFAULT_DRIVER_NAME,
  29. Color routeColor = Constants.ROUTE_COLOR,
  30. int routeWidth = Constants.ROUTE_WIDTH,
  31. Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers = const <Factory<OneSequenceGestureRecognizer>>{},
  32. bool compassEnabled = true,
  33. bool mapToolbarEnabled = true,
  34. CameraTargetBounds cameraTargetBounds = CameraTargetBounds.unbounded,
  35. MapType mapType = MapType.normal,
  36. MinMaxZoomPreference minMaxZoomPreference = MinMaxZoomPreference.unbounded,
  37. bool rotateGesturesEnabled = true,
  38. bool scrollGesturesEnabled = true,
  39. bool zoomControlsEnabled = true,
  40. bool zoomGesturesEnabled = true,
  41. bool liteModeEnabled = false,
  42. bool tiltGesturesEnabled = true,
  43. bool myLocationEnabled = false,
  44. bool myLocationButtonEnabled = true,
  45. EdgeInsets padding = const EdgeInsets.all(0),
  46. bool indoorViewEnabled = false,
  47. bool trafficEnabled = false,
  48. bool buildingsEnabled = true,
  49. Set<Polygon> polygons = const <Polygon>{},
  50. Set<Circle> circles = const <Circle>{},
  51. VoidCallback? onCameraMoveStarted,
  52. Set<TileOverlay> tileOverlays = const <TileOverlay>{},
  53. CameraPositionCallback? onCameraMove,
  54. VoidCallback? onCameraIdle,
  55. ArgumentCallback<LatLng>? onTap,
  56. 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);