GoogleMap constructor

const GoogleMap(
  1. {Key key,
  2. @required CameraPosition initialCameraPosition,
  3. MapCreatedCallback onMapCreated,
  4. Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers,
  5. bool compassEnabled: true,
  6. bool mapToolbarEnabled: true,
  7. CameraTargetBounds cameraTargetBounds: CameraTargetBounds.unbounded,
  8. MapType mapType: MapType.normal,
  9. MinMaxZoomPreference minMaxZoomPreference: MinMaxZoomPreference.unbounded,
  10. bool rotateGesturesEnabled: true,
  11. bool scrollGesturesEnabled: true,
  12. bool zoomControlsEnabled: true,
  13. bool zoomGesturesEnabled: true,
  14. bool liteModeEnabled: false,
  15. bool tiltGesturesEnabled: true,
  16. bool myLocationEnabled: false,
  17. bool myLocationButtonEnabled: true,
  18. EdgeInsets padding: const EdgeInsets.all(0),
  19. bool indoorViewEnabled: false,
  20. bool trafficEnabled: false,
  21. bool buildingsEnabled: true,
  22. Set<Marker> markers,
  23. Set<Polygon> polygons,
  24. Set<Polyline> polylines,
  25. Set<Circle> circles,
  26. VoidCallback onCameraMoveStarted,
  27. CameraPositionCallback onCameraMove,
  28. VoidCallback onCameraIdle,
  29. ArgumentCallback<LatLng> onTap,
  30. ArgumentCallback<LatLng> onLongPress}
)

Creates a widget displaying data from Google Maps services.

AssertionError will be thrown if initialCameraPosition is null;

Implementation

const GoogleMap({
  Key key,
  @required this.initialCameraPosition,
  this.onMapCreated,
  this.gestureRecognizers,
  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,

  /// If no padding is specified default padding will be 0.
  this.padding = const EdgeInsets.all(0),
  this.indoorViewEnabled = false,
  this.trafficEnabled = false,
  this.buildingsEnabled = true,
  this.markers,
  this.polygons,
  this.polylines,
  this.circles,
  this.onCameraMoveStarted,
  this.onCameraMove,
  this.onCameraIdle,
  this.onTap,
  this.onLongPress,
})  : assert(initialCameraPosition != null),
      super(key: key);