google_navigation_flutter library

Classes

AndroidNavigationSessionAPIImpl
AutoMapOptions
Configuration options for Android Auto and CarPlay map views.
AutoScreenAvailabilityChangedEvent Navigation Android Auto Carplay
CameraChangedEvent Navigation View Map View
Represents camera changed events in a Google Maps view.
CameraPosition Navigation View Map View Android Auto Carplay
Represents the camera position in a Google Maps view.
CameraUpdate Navigation View Map View Android Auto Carplay
Defines a camera move, supporting absolute moves as well as moves relative the current position.
Circle Navigation View Map View Android Auto Carplay
Circle that has beed added to map.
CircleClickedEvent Navigation View Map View
Event emitted when a circle is clicked.
CircleOptions Navigation View Map View
Defines CircleOptions for a circle.
ContinueToNextDestinationResponse Navigation
Response returned by GoogleMapsNavigator.continueToNextDestination.
CustomNavigationAutoEvent Navigation Android Auto Carplay
DashPattern Navigation View Map View
Class representing a dash used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
Destinations Navigation
Destinations main type.
DotPattern Navigation View Map View
Class representing a dot used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
GapPattern Navigation View Map View
Class representing a gap used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
GoogleMapsAutoViewController Android Auto Carplay
GoogleMapsBaseMapView Map View
The base view for map view and navigation view. Not to be used by itself.
GoogleMapsMapView Map View
The main map view widget for Google Maps Map View.
GoogleMapsMapViewState Map View
Google Maps Map View.
GoogleMapsNavigationView Navigation View
The main map view widget for Google Maps Navigation.
GoogleMapsNavigationViewState Navigation View
Google Maps Navigation.
GoogleMapsNavigator Navigation
GoogleMapsNavigator handles general actions of the navigation SDK and allows creating navigation session controller.
GoogleMapViewController Map View
Map View Controller class to handle map view events.
GoogleNavigationViewController Navigation View
Navigation View Controller class to handle navigation view events.
GpsAvailabilityChangeEvent Navigation
GpsAvailabilityChange event message (Android only).
GpsAvailabilityUpdatedEvent Navigation
GpsAvailabilityUpdated event message (Android only).
ImageDescriptor Image Registry
Defines an image. For marker this class can be used to set the image of the marker icon.
IndoorActiveLevelChangedEvent Navigation View Map View
Event emitted when active indoor level changes.
IndoorBuilding Navigation View Map View
Represents focused indoor building metadata.
IndoorFocusedBuildingChangedEvent Navigation View Map View
Event emitted when focused indoor building changes.
IndoorLevel Navigation View Map View
Represents one indoor level in a focused indoor building.
InfoWindow Navigation View Map View
Text labels for Marker info window.
Lane Navigation
Single lane on the road at the end of a route step.
LaneDirection Navigation
One of the possible directions from a lane at the end of a route step, and whether it is on the recommended route.
LatLng Navigation Navigation View Map View Android Auto Carplay
LatLng coordinate object.
LatLngBounds Navigation View Map View Android Auto Carplay
LatLngBounds bounds object.
MapClickEvent Navigation View Map View
Represents the click position in a Google Maps view.
MapLongClickEvent Navigation View Map View
Represents the long click position in a Google Maps view.
MapOptions Navigation View Map View
Encapsulates the initial configuration required to initialize the google map view.
MapViewInitializationOptions Navigation View Map View
Encapsulates the initial configuration required to initialize the navigation map view.
MapViewState<T extends GoogleMapsBaseMapView>
Marker Navigation View Map View Android Auto Carplay
Marker that has beed added to the map.
MarkerAnchor Navigation View Map View
Specifies the anchor to be at a particular point in the marker image.
MarkerDragEvent Navigation View Map View
Marker drag event sent from platform side.
MarkerEvent Navigation View Map View
Marker event sent from platform side.
MarkerOptions Navigation View Map View
Defines MarkerOptions for a marker.
MyLocationButtonClickedEvent Navigation View Map View
My location button clicked event.
MyLocationClickedEvent Navigation View Map View
My location clicked event.
Navigation audio guidance settings.
Display options.
Styling options for the native navigation header.
Time and distance to next waypoint.
Represents navigation UI changed event in a view.
Encapsulates the initial configuration required to initialize the navigation view.
Navigation view recenter clicked event.
Settings for the user interface of the map.
Navigation waypoint with different constructors based in on type of initialization.
Contains information about the state of navigation, the current nav step if available, and remaining steps if available.
NavInfo event message
OnArrivalEvent Navigation
On arrival event message
PatternItem Navigation View Map View
Item used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
PoiClickedEvent Navigation View Map View
Represents a POI click event in a Google Maps view.
PointOfInterest Navigation View Map View
Represents a point of interest (POI) on the map. POIs include parks, schools, government buildings, and businesses.
Polygon Navigation View Map View Android Auto Carplay
Polygon that has beed added to map.
PolygonClickedEvent Navigation View Map View
Event emitted when a polygon is clicked.
PolygonOptions Navigation View Map View
Defines PolygonOptions for a polygon.
Polyline Navigation View Map View Android Auto Carplay
Polyline that has beed added to map.
PolylineClickedEvent Navigation View Map View
Event emitted when a polyline is clicked.
PolylineOptions Navigation View Map View
Defines PolylineOptions for a polyline.
PromptVisibilityChangedEvent Navigation View Android Auto Carplay
Represents prompt visibility changed event in a view.
RemainingTimeOrDistanceChangedEvent Navigation
Remaining time or distance change event message.
RoadSnappedLocationUpdatedEvent Navigation
RoadSnappedLocationUpdated event message.
RoadSnappedRawLocationUpdatedEvent Navigation
RoadSnappedRawLocationUpdated event message (Android only).
RouteSegment Navigation View
Navigation route segment
RouteSegmentTrafficData Navigation View
Route segment traffic data.
RouteSegmentTrafficDataRoadStretchRenderingData Navigation View
Route segment traffic data road strech rendering data type.
RouteTokenOptions Navigation
Provides options for routing using a route token in the Google Maps Navigation SDK.
RoutingOptions Navigation
Routing options.
SimulationOptions Navigation
Navigation simulation options.
SpeedAlertOptions Navigation
Speed alert options.
SpeedingUpdatedEvent Navigation
SpeedingUpdated event message.
StepImageGenerationOptions Navigation
Options for step image generation in turn-by-turn navigation events.
StepInfo Navigation
Information about a single step along a navigation route.
StyleSpan Navigation View Map View
Style and length of a stroke on polyline.
StyleSpanStrokeStyle Navigation View Map View
Style for stroke of a polyline.
TermsAndConditionsUIParams
UI customization parameters for the Terms and Conditions dialog.

Enums

CameraEventType Navigation View Map View
Represents the event type for CameraChangedEvent.
CameraPerspective Navigation View Map View Android Auto Carplay
Parameter given to parameter given to the GoogleNavigationViewController.followMyLocation to specify the orientation of the camera.
CameraUpdateType Navigation View Map View
Internal camera update type.
DrivingSide Navigation
Whether this step is on a drive-on-right or drive-on-left route.
LaneShape Navigation
A set of values that specify the shape of the road path continuing from the Lane.
Maneuver Navigation
A set of values that specify the navigation action to take.
MapColorScheme Navigation View Map View
Map color scheme mode.
MapType Navigation View Map View Android Auto Carplay
Map type.
MarkerDragEventType Navigation View Map View
Marker drag event types
MarkerEventType Navigation View Map View
Marker event types
Alternative routes strategy.
Navigation audio guidance type.
Navigation night mode.
Status of the navigation routing.
Routing strategy.
Travel model for routing options.
Determines the initial visibility of the navigation UI on map initialization.
The state of navigation.
PatternType Navigation View Map View
Pattern used in the stroke pattern for a Polyline or the outline of a Polygon or Circle.
RegisteredImageType Image Registry
Registered image type filter for clearing registered images.
RouteSegmentTrafficDataRoadStretchRenderingDataStyle Navigation View
Route segment traffic data road strech rendering style.
RouteSegmentTrafficDataStatus Navigation View
Traffic data statuses
SessionInitializationError Navigation
Possible errors that GoogleMapsNavigator.initializeNavigationSession can throw.
SpeedAlertSeverity Navigation
Type for speed alert severity.
StrokeJointType Navigation View Map View
Joint types for Polyline and outline of Polygon.
TaskRemovedBehavior Navigation
Determines how application should behave when a application task is removed.
TrafficDelaySeverity Navigation
Traffic delay severity.

Constants

unsupportedPlatformCode → const String
Platform code for unsupported features.

Functions

clearRegisteredImages({RegisteredImageType? filter}) Future<void> Image Registry
Remove all registered bitmaps from image registry.
convertPlatformException(Object exception, StackTrace stacktrace) Object
Converts exception to GoogleMapsNavigationPlatformException if exception is a PlatformException.
getRegisteredImage(ImageDescriptor imageDescriptor) Future<Image?> Image Registry
Get registered PNG image data from image registry anc convert it to Image.
getRegisteredImages() Future<List<ImageDescriptor>> Image Registry
Get all registered bitmaps from image registry.
registerBitmapImage({required ByteData bitmap, double imagePixelRatio = 1.0, double? width, double? height}) Future<ImageDescriptor> Image Registry
Register bitmap image to image registry. Returns ImageDescriptor that can be used to reference the bitmap when creating MarkerOptions. bitmap is the bytes of bitmap to be registered, in PNG format. Set imagePixelRatio if bitmap is larger tha it's intended display size. For example, if image width is 64 pixels and it need's to be displayed in 32 logical pixel size, set imagePixelRatio to 2. Optionally specify wanted logical pixel size with width or height. If only width or height is specified the other dimension is scaled according to the aspect ratio of the bitmap.
unregisterImage(ImageDescriptor imageDescriptor) Future<void> Image Registry
Delete previously registered bitmap from image registry.

Typedefs

AnimationFinishedCallback = void Function(bool success)
Called when the camera animation finishes.
OnArrivalEventCallback = void Function(OnArrivalEvent onArrivalEvent)
Called during arriving to destination event.
OnCameraIdle = void Function(CameraPosition position)
Called when the camera movement has ended, there are no pending animations and the user has stopped interacting with the map.
OnCameraMove = void Function(CameraPosition position)
Called repeatedly as the camera continues to move after the OnCameraMoveStarted call. The method may be called as often as once every frame.
OnCameraMoveStarted = void Function(CameraPosition position, bool gesture)
Called when the camera starts moving after it has been idle or when the reason for the camera motion has changed.
OnCameraStartedFollowingLocation = void Function(CameraPosition position)
Called when the camera starts following current location, typically will get called in response to GoogleNavigationViewController.followMyLocation. Only applicable on Android.
OnCameraStoppedFollowingLocation = void Function(CameraPosition position)
Called when the camera stops following current location. A camera already following location will exit the follow mode if the camera is moved via user gesture or an API call, e.g. GoogleNavigationViewController.moveCamera or GoogleNavigationViewController.animateCamera. Only applicable on Android.
OnCircleClicked = void Function(String circleId)
Called during circle clicked event.
OnGpsAvailabilityChangeEventCallback = void Function(GpsAvailabilityChangeEvent gpsAvailabilityChangeEvent)
Called during GPS availability change event. (Android only).
OnGpsAvailabilityEventCallback = void Function(GpsAvailabilityUpdatedEvent gpsAvailabilityUpdatedEvent)
Called during GPS availability event. (Android only).
OnIndoorActiveLevelChanged = void Function(IndoorBuilding? building)
Called when the active indoor level changes.
OnIndoorFocusedBuildingChanged = void Function(IndoorBuilding? building)
Called when the focused indoor building changes.
OnMapClicked = void Function(LatLng position)
Called during map clicked event.
OnMapLongClicked = void Function(LatLng position)
Called during map long clicked event.
OnMapViewCreatedCallback = void Function(GoogleMapViewController controller)
On Google Map view created callback.
OnMarkerClicked = void Function(String circleId)
Called during marker click event.
OnMarkerDrag = void Function(String markerId, LatLng newPosition)
Called during marker drag event.
OnMarkerDragEnd = void Function(String markerId, LatLng newPosition)
Called during marker drag end event.
OnMarkerDragStart = void Function(String markerId, LatLng newPosition)
Called during marker drag start event.
OnMarkerInfoWindowClicked = void Function(String circleId)
Called during marker info window clicked event.
OnMarkerInfoWindowClosed = void Function(String circleId)
Called during marker info window closed event.
OnMarkerInfoWindowLongClicked = void Function(String circleId)
Called during marker info window long clicked event.
OnMyLocationButtonClicked = void Function(MyLocationButtonClickedEvent)
Called during my location button clicked event.
OnMyLocationClicked = void Function(MyLocationClickedEvent)
Called during my location clicked event.
OnNavigationUIEnabledChanged = void Function(bool success)
Called when the GoogleNavigationViewController.isNavigationUIEnabled status changes.
OnNavigationViewCreatedCallback = void Function(GoogleNavigationViewController controller)
On Google Navigation view created callback.
OnNavInfoEventCallback = void Function(NavInfoEvent onNavInfo)
Called on navigation info event.
OnNewNavigationSessionCallback = void Function()
Called on new navigation session event.
OnPoiClicked = void Function(PointOfInterest pointOfInterest)
Called when a user taps on a point of interest (POI) on the map. POIs include parks, schools, government buildings, and businesses.
OnPolygonClicked = void Function(String circleId)
Called during polygon clicked event.
OnPolylineClicked = void Function(String circleId)
Called during polyline clicked event.
OnPromptVisibilityChanged = void Function(bool success)
Called when the visibility of navigation prompts changes.
OnRecenterButtonClicked = void Function(NavigationViewRecenterButtonClickedEvent)
Called during recenter button click event.
OnRemainingTimeOrDistanceChangedEventCallback = void Function(RemainingTimeOrDistanceChangedEvent onRemainingTimeOrDistanceChangedEvent)
Called during remaining time or distance changed event.
OnReroutingEventCallback = void Function()
Called during rerouting event. (Android only)
OnRoadSnappedLocationUpdatedEventCallback = void Function(RoadSnappedLocationUpdatedEvent onRoadSnappedLocationUpdatedEvent)
Called during road snapped location event.
OnRoadSnappedRawLocationUpdatedEventCallback = void Function(RoadSnappedRawLocationUpdatedEvent onRoadSnappedRawLocationUpdatedEvent)
Called during road snapped raw location event (Android only).
OnRouteChangedEventCallback = void Function()
Called during route changed event.
OnSpeedingUpdatedEventCallback = void Function(SpeedingUpdatedEvent onSpeedingUpdatedEvent)
Called during speeding event.
OnTrafficUpdatedEventCallback = void Function()
Called during traffic updated event. (Android only)

Exceptions / Errors

CircleNotFoundException Navigation View Map View
GoogleNavigationViewController.updateCircles or GoogleNavigationViewController.removeCircles failed to find the circle given to the method.
GoogleMapsNavigationPlatformException Navigation View Map View
Abstract base class for specific platform exceptions derived from this plugin.
ImageDecodingFailedException Image Registry
registerBitmapImage failed to decode bitmap from byte array.
IndoorLevelActivationException Navigation View Map View
GoogleNavigationViewController.activateIndoorLevel failed.
MapStyleException Navigation View Map View
GoogleNavigationViewController.setMapStyle failed to set the map style.
MarkerNotFoundException Navigation View Map View
GoogleNavigationViewController.updateMarkers or GoogleNavigationViewController.removeMarkers failed to find the marker given to the method.
MaxZoomRangeException Navigation View Map View
GoogleNavigationViewController.setMaxZoomPreference failed to set zoom level.
MinZoomRangeException Navigation View Map View
GoogleNavigationViewController.setMinZoomPreference failed to set zoom level.
PolygonNotFoundException Navigation View Map View
GoogleNavigationViewController.updatePolygons or GoogleNavigationViewController.removePolygons failed to find the polygon given to the method.
PolylineNotFoundException Navigation View Map View
GoogleNavigationViewController.updatePolylines or GoogleNavigationViewController.removePolylines failed to find the polyline given to the method.
ResetTermsAndConditionsException Navigation
Exception thrown by GoogleMapsNavigator.resetTermsAccepted, when attempting to reset the terms and conditions after the session has already been initialized.
RouteTokenMalformedException
GoogleMapsNavigator.setDestinations method call has failed, because the RouteTokenOptions.routeToken is malformed. (Android only)
SessionInitializationException Navigation
Exception thrown by GoogleMapsNavigator.initializeNavigationSession.
SessionNotInitializedException Navigation
GoogleMapsNavigator navigation method call has failed, because the navigation session hasn't yet been successfully initialized.
ViewNotFoundException Navigation View Map View
Exception thrown when a platform view is not found.