GoogleMap constructor

const GoogleMap({
  1. Key? key,
  2. required CameraPosition initialCameraPosition,
  3. MapCreatedCallback? onMapCreated,
  4. Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers = const <Factory<OneSequenceGestureRecognizer>>{},
  5. WebGestureHandling? webGestureHandling,
  6. bool compassEnabled = true,
  7. bool mapToolbarEnabled = true,
  8. CameraTargetBounds cameraTargetBounds = CameraTargetBounds.unbounded,
  9. MapType mapType = MapType.normal,
  10. MinMaxZoomPreference minMaxZoomPreference = MinMaxZoomPreference.unbounded,
  11. bool rotateGesturesEnabled = true,
  12. bool scrollGesturesEnabled = true,
  13. bool zoomControlsEnabled = true,
  14. bool zoomGesturesEnabled = true,
  15. bool liteModeEnabled = false,
  16. bool tiltGesturesEnabled = true,
  17. bool fortyFiveDegreeImageryEnabled = false,
  18. bool myLocationEnabled = false,
  19. bool myLocationButtonEnabled = true,
  20. TextDirection? layoutDirection,
  21. EdgeInsets padding = EdgeInsets.zero,
  22. bool indoorViewEnabled = false,
  23. bool trafficEnabled = false,
  24. bool buildingsEnabled = true,
  25. Set<Marker> markers = const <Marker>{},
  26. Set<Polygon> polygons = const <Polygon>{},
  27. Set<Polyline> polylines = const <Polyline>{},
  28. Set<Circle> circles = const <Circle>{},
  29. VoidCallback? onCameraMoveStarted,
  30. Set<TileOverlay> tileOverlays = const <TileOverlay>{},
  31. CameraPositionCallback? onCameraMove,
  32. VoidCallback? onCameraIdle,
  33. ArgumentCallback<LatLng>? onTap,
  34. ArgumentCallback<Map>? onDrawmanagerChange,
  35. List<LatLng>? heatPoints,
  36. ArgumentCallback<LatLng>? onLongPress,
  37. String? cloudMapId,
})

Creates a widget displaying data from Google Maps services.

AssertionError will be thrown if initialCameraPosition is null;

Implementation

const GoogleMap({
  super.key,
  required this.initialCameraPosition,
  this.onMapCreated,
  this.gestureRecognizers = const <Factory<OneSequenceGestureRecognizer>>{},
  this.webGestureHandling,
  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.fortyFiveDegreeImageryEnabled = false,
  this.myLocationEnabled = false,
  this.myLocationButtonEnabled = true,
  this.layoutDirection,

  /// If no padding is specified default padding will be 0.
  this.padding = EdgeInsets.zero,
  this.indoorViewEnabled = false,
  this.trafficEnabled = false,
  this.buildingsEnabled = true,
  this.markers = const <Marker>{},
  this.polygons = const <Polygon>{},
  this.polylines = const <Polyline>{},
  this.circles = const <Circle>{},
  this.onCameraMoveStarted,
  this.tileOverlays = const <TileOverlay>{},
  this.onCameraMove,
  this.onCameraIdle,
  this.onTap,
  this.onDrawmanagerChange,
  this.heatPoints,
  this.onLongPress,
  this.cloudMapId,
});