GoogleMap constructor
const
GoogleMap({
- Key? key,
- required CameraPosition initialCameraPosition,
- MapCreatedCallback? onMapCreated,
- Set<
Factory< gestureRecognizers = const <Factory<OneSequenceGestureRecognizer>>{},OneSequenceGestureRecognizer> > - WebGestureHandling? webGestureHandling,
- 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 fortyFiveDegreeImageryEnabled = false,
- bool myLocationEnabled = false,
- bool myLocationButtonEnabled = true,
- TextDirection? layoutDirection,
- EdgeInsets padding = EdgeInsets.zero,
- bool indoorViewEnabled = false,
- bool trafficEnabled = false,
- bool buildingsEnabled = true,
- Set<
Marker> markers = const <Marker>{}, - Set<
Polygon> polygons = const <Polygon>{}, - Set<
Polyline> polylines = const <Polyline>{}, - Set<
Circle> circles = const <Circle>{}, - VoidCallback? onCameraMoveStarted,
- Set<
TileOverlay> tileOverlays = const <TileOverlay>{}, - CameraPositionCallback? onCameraMove,
- VoidCallback? onCameraIdle,
- ArgumentCallback<
LatLng> ? onTap, - ArgumentCallback<
Map> ? onDrawmanagerChange, - List<
LatLng> ? heatPoints, - ArgumentCallback<
LatLng> ? onLongPress, - 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,
});