GoogleMapView class

A Flutter widget that renders a native Google Map view.

Inheritance

Constructors

GoogleMapView({Key? key, required CameraPosition initialCameraPosition, bool trafficEnabled = false, bool buildingsEnabled = true, bool myLocationEnabled = false, String? mapStyleJson, MapPadding padding = const MapPadding(), bool clusterEnabled = false, bool liteMode = false, bool indoorEnabled = false, bool indoorLevelPicker = false, String? mapId, MapCreatedCallback? onMapCreated, String? webApiKey, void onMarkerTap(BuildContext context, String markerId)?})
const

Properties

buildingsEnabled bool
final
clusterEnabled bool
Enables Google Maps Utils clustering (Android/iOS only).
final
hashCode int
The hash code for this object.
no setterinherited
indoorEnabled bool
Enables indoor maps (iOS/Android). On Android, also pair with indoorLevelPicker.
final
indoorLevelPicker bool
Android UI: show indoor level picker control.
final
initialCameraPosition CameraPosition
Initial camera position when the map is first shown.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
liteMode bool
Android only: use Lite Mode for better performance in mini-maps.
final
mapId String?
Cloud Map styling via Map ID.
final
mapStyleJson String?
Optional custom JSON style to apply.
final
myLocationEnabled bool
final
onMapCreated MapCreatedCallback?
Called when the underlying platform view is created.
final
onMarkerTap → void Function(BuildContext context, String markerId)?
Optional convenience callback fired when a marker is tapped. Useful to open any Flutter widget (bottom sheet, dialog, overlay, etc.). If you need more control, you can also listen to GoogleMapController.onMarkerTap directly.
final
padding MapPadding
Padding to apply around the map viewport.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
trafficEnabled bool
final
webApiKey String?
Web only: API key for the Google Maps JavaScript API. If null, you must include the script manually in web/index.html.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<GoogleMapView>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited