GoogleMapsController class
This class implements a Map Controller and its events
Constructors
-
GoogleMapsController({required int mapId, required StreamController<
MapEvent< streamController, required CameraPosition initialCameraPosition, Set<Object?> >Marker> markers = const <Marker>{}, Set<Polygon> polygons = const <Polygon>{}, Set<Polyline> polylines = const <Polyline>{}, Set<Circle> circles = const <Circle>{}, Map<String, dynamic> mapOptions = const <String, dynamic>{}}) - Initializes the GoogleMapsController.
Properties
-
controller
→ Future<
WebViewController> -
Returns webview controller instance.
no setter
-
events
→ Stream<
MapEvent< Object?> > -
The Stream over which this controller broadcasts events.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- widget → Widget?
-
The Flutter widget that will contain the rendered Map. Used for caching.
no setter
Methods
-
dispose(
) → void - Disposes of this controller and its resources.
-
getCenter(
) → Future< LatLng> -
Returns the
LatLng
at the center of the map. -
getLatLng(
ScreenCoordinate screenCoordinate) → Future< LatLng> -
Returns the
LatLng
for ascreenCoordinate
(in pixels) of the viewport. -
getMinMaxZoomLevels(
) → Future< MinMaxZoomPreference> - Returns min-max zoom levels. Test only.
-
getScreenCoordinate(
LatLng latLng) → Future< ScreenCoordinate> -
Returns the
ScreenCoordinate
for a given viewportLatLng
. -
getVisibleRegion(
) → Future< LatLngBounds> -
Returns the
LatLngBounds
of the current viewport. -
getZoomLevel(
) → Future< double> - Returns the zoom level of the current viewport.
-
hideInfoWindow(
MarkerId markerId) → void -
Hides the
InfoWindow
of the marker identified by itsMarkerId
. -
init(
) → void -
Initializes the map from the stored
rawOptions
. -
isInfoWindowShown(
MarkerId markerId) → bool -
Returns true if the
InfoWindow
of the marker identified byMarkerId
is shown. -
isScrollGesturesEnabled(
) → Future< bool> - Returns if scrollGestures property is enabled. Test only.
-
isTrafficEnabled(
) → Future< bool> - Returns if traffic layer is enabled. Test only.
-
isZoomControlsEnabled(
) → Future< bool> - Returns if zoomControls property is enabled. Test only.
-
isZoomGesturesEnabled(
) → Future< bool> - Returns if zoomGestures property is enabled. Test only.
-
moveCamera(
CameraUpdate cameraUpdate) → Future< void> -
Applies a
cameraUpdate
to the current viewport. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
showInfoWindow(
MarkerId markerId) → void -
Shows the
InfoWindow
of the marker identified by itsMarkerId
. -
toString(
) → String -
A string representation of this object.
inherited
-
updateCircles(
CircleUpdates updates) → void -
Applies
CircleUpdates
to the currently managed circles. -
updateMarkers(
MarkerUpdates updates) → void -
Applies
MarkerUpdates
to the currently managed markers. -
updatePolygons(
PolygonUpdates updates) → void -
Applies
PolygonUpdates
to the currently managed polygons. -
updatePolylines(
PolylineUpdates updates) → void -
Applies
PolylineUpdates
to the currently managed lines. -
updateRawOptions(
Map< String, dynamic> optionsUpdate) → void -
Updates the map options from a
Map<String, dynamic>
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited