GoogleMapProvider class
GoogleMapProvider is a provider class responsible for managing the state and logic related to Google Maps in the application. It provides methods to add, remove, and update markers on the map, as well as methods to update the camera position and fly to a specific location. It also manages the state of the map controller, the current full address, the pin pill position, and the custom tour mode.
- Mixed in types
Constructors
Properties
- allowSync ↔ bool
-
getter/setter pair
- bearing → double
-
no setter
- center → LatLng
-
no setter
-
currentFullAddress
↔ Map<
String, String?> -
getter/setter pair
- currentlySelectedPin ↔ PlacesModel
-
currentlySelectedPin is a PlacesModel object that represents the currently selected pin on the map.
getter/setter pair
-
customTourMainMarkers
→ Set<
Marker> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isTourOn ↔ bool
-
getter/setter pair
- isWorld ↔ bool
-
getter/setter pair
- mapController ← GoogleMapController
-
no getter
-
markers
→ Set<
Marker> -
no setter
- onMapReset ↔ Function?
-
getter/setter pair
- pinPillPosition ↔ double
-
getter/setter pair
-
polylineMarkers
→ Map<
Polyline, List< Marker> > -
no setter
-
polylines
→ Set<
Polyline> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tilt → double
-
no setter
- zoom → double
-
no setter
- zoomvalue → double
-
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
addMarker(
BuildContext context, PlacesModel poi, {bool removeAll = true, bool isFromFav = false}) → Future< void> -
addMarker method adds a marker to the map.
It takes a BuildContext object, a PlacesModel object, and optional parameters
removeAll
andisFromFav
. It adds a marker to the map with the givenpoi
object and sets the marker's info window to display the name and description of the place. IfremoveAll
is true, it removes all existing markers from the map before adding the new marker. IfisFromFav
is true, it adds the marker to the custom tour main markers set and removes the place from the displayed places list and adds it to the tour places list. -
addMarkersForPolylines(
) → void - addMarkersForPolylines method adds markers for the polylines on the map. It takes no parameters and adds markers for the polylines on the map.
-
addPolylinesBetweenMarkers(
) → void - addPolylinesBetweenMarkers method adds polylines between the markers on the map. It takes no parameters and adds polylines between the markers on the map.
-
clearCustomMarkers(
) → void -
clearMarkers(
) → void -
clearPolylines(
) → void -
clearPolylinesMap(
) → void -
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
-
flyToLocation(
LatLng targetLocation) → void -
flyToLocation method animates the camera to fly to a specific location on the map.
It takes a LatLng object representing the target location and animates the camera to fly to that location.
The method is asynchronous and returns a Future of
void
. -
googleMapCustomTour(
) → Future< void> -
interpolatePoints(
LatLng start, LatLng end, int numPoints) → List< LatLng> - interpolatePoints method interpolates points between two given points. It takes two LatLng objects representing the start and end points, and an int value representing the number of points to interpolate.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
removeMarker(
String markerId) → void -
setBitmapDescriptor(
String imagePath) → Future< void> -
setBitmapDescriptor method sets the bitmap descriptor for the icon marker on the map.
It takes an
imagePath
parameter and sets the bitmap descriptor from the given image path. The image is converted to bytes and then set as the bitmap descriptor for the icon marker. The method is asynchronous and returns a Future ofvoid
. -
setMapResetCallback(
Function callback) → void -
toString(
) → String -
A string representation of this object.
inherited
-
updateBearing(
double bearing) → void -
updateCameraPosition(
CameraPosition position) → void -
updateCameraPosition method updates the camera position of the map.
It takes a CameraPosition object representing the new camera position and updates the camera position of the map.
The method is asynchronous and returns a Future of
void
. -
updateTilt(
double tilt) → void -
updateZoom(
double zoom) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited