GoogleMapsController class

Wrapper of GoogleMapController same interface

Also adds the methods, streams and utilities to interact with the map

Inheritance

Constructors

GoogleMapsController({void onMapCreated(GoogleMapController) = _voidFunctionOneParameter, void onCameraIdle() = _voidFunction, void onCameraMove(CameraPosition) = _voidFunctionOneParameter, void onCameraMoveStarted() = _voidFunction, void onLongPress(LatLng) = _voidFunctionOneParameter, void onTap(LatLng) = _voidFunctionOneParameter, CameraPosition? initialCameraPosition, Set<Circle>? initialCircles, Set<Marker>? initialMarkers, Set<Polygon>? initialPolygons, Set<Polyline>? initialPolylines, bool buildingsEnabled = true, CameraTargetBounds cameraTargetBounds = CameraTargetBounds.unbounded, bool compassEnabled = true, bool indoorViewEnabled = false, bool liteModeEnabled = false, bool zoomControlsEnabled = true, bool mapToolbarEnabled = true, MapType mapType = MapType.normal, MinMaxZoomPreference minMaxZoomPreference = MinMaxZoomPreference.unbounded, bool myLocationEnabled = false, bool myLocationButtonEnabled = true, EdgeInsets padding = const EdgeInsets.all(0), bool rotateGesturesEnabled = true, bool scrollGesturesEnabled = true, bool tiltGesturesEnabled = true, bool trafficEnabled = false, bool zoomGesturesEnabled = true, List<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers})

Properties

buildingsEnabled bool
getter/setter pair
cameraTargetBounds CameraTargetBounds
getter/setter pair
circles Set<Circle>
getter/setter pair
compassEnabled bool
getter/setter pair
context BuildContext?
no setter
controller GoogleMapController?
no setter
gestureRecognizers Set<Factory<OneSequenceGestureRecognizer>>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
indoorViewEnabled bool
getter/setter pair
initialCameraPosition CameraPosition
final
initted bool
no setter
liteModeEnabled bool
getter/setter pair
mapToolbarEnabled bool
getter/setter pair
mapType MapType
getter/setter pair
markers Set<Marker>
getter/setter pair
minMaxZoomPreference MinMaxZoomPreference
getter/setter pair
myLocationButtonEnabled bool
getter/setter pair
myLocationEnabled bool
getter/setter pair
onCameraIdle → void Function()
no setter
onCameraIdle$ Stream<void>
no setter
onCameraMove → void Function(CameraPosition)
no setter
onCameraMove$ Stream<CameraPosition>
no setter
onCameraMoveStarted → void Function()
no setter
onCameraMoveStarted$ Stream<void>
no setter
onLongPress → void Function(LatLng)
no setter
onLongPress$ Stream<LatLng>
no setter
onMapCreated → void Function(GoogleMapController)
no setter
onTap → void Function(LatLng)
no setter
onTap$ Stream<LatLng>
no setter
padding EdgeInsets
getter/setter pair
polygons Set<Polygon>
getter/setter pair
polylines Set<Polyline>
getter/setter pair
rotateGesturesEnabled bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollGesturesEnabled bool
getter/setter pair
tiltGesturesEnabled bool
getter/setter pair
trafficEnabled bool
getter/setter pair
zoom Future<double?>
no setter
zoomControlsEnabled bool
getter/setter pair
zoomGesturesEnabled bool
getter/setter pair

Methods

addCircle(Circle circle) → dynamic
addCircles(List<Circle> circles) → dynamic
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addMarker(Marker marker) → dynamic
addMarkers(List<Marker> markers) → dynamic
addPolygon(Polygon polygon) → dynamic
addPolygons(List<Polygon> polygons) → dynamic
addPolyline(Polyline polyline) → dynamic
addPolylines(List<Polyline> polylines) → dynamic
animateCamera(CameraUpdate cameraUpdate) Future<void>
clearCircles() → dynamic
clearMarkers() → dynamic
clearPolygons() → dynamic
clearPolylines() → dynamic
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
getLatLng(ScreenCoordinate screenCoordinate) Future<LatLng?>
getScreenCoordinate(LatLng latLng) Future<ScreenCoordinate?>
getVisibleRegion() Future<LatLngBounds?>
getZoomLevel() Future<double?>
hideMarkerInfoWindow(MarkerId markerId) Future<void>
init(GoogleMapController controller) → void
Sets a pure GoogleMapController to GoogleMapsController for custom use or add functionality to pure controller.
isMarkerInfoWindowShown(MarkerId markerId) Future<bool?>
moveCamera(CameraUpdate cameraUpdate) Future<void>
newCameraPosition(CameraPosition cameraPosition, {bool animate = false}) Future<void>
newLatLng(LatLng latLng, {bool animate = false}) Future<void>
newLatLngBounds(LatLngBounds bounds, double padding, {bool animate = false}) Future<void>
newLatLngZoom(LatLng latLng, double zoom, {bool animate = false}) Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeCircle(Circle circle) → dynamic
removeCircles(Iterable<Circle> circles) → dynamic
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeMarker(Marker marker) → dynamic
removeMarkers(Iterable<Marker> markers) → dynamic
removePolygon(Polygon polygon) → dynamic
removePolygons(Iterable<Polygon> polygons) → dynamic
removePolyline(Polyline polyline) → dynamic
removePolylines(Iterable<Polyline> polylines) → dynamic
scrollBy(double dx, double dy, {bool animate = false}) Future<void>
setContext(BuildContext context) → void
Set BuildContext to the controller used to perform some methods over it
setMapStyle(String mapStyle) Future<void>
showMarkerInfoWindow(MarkerId markerId) Future<void>
takeSnapshot() Future<Uint8List?>
toString() String
A string representation of this object.
inherited
updateCamera(CameraUpdate cameraUpdate, {bool animate = false}) Future<void>
zoomBy(double amount, {Offset? focus, bool animate = false}) Future<void>
zoomIn({bool animate = false}) Future<void>
zoomOut({bool animate = false}) Future<void>
zoomTo(double zoom, {bool animate = false}) Future<void>

Operators

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