setNavigationUIEnabled method

Future<void> setNavigationUIEnabled(
  1. bool enabled
)

Show or hide the navigation user interface shown on top of the map.

When enabled also actives followMyLocation camera mode.

Disabling hides routes on iOS, but on Android the routes stay visible.

By default, the navigation UI is enabled when the session has been initialized with GoogleMapsNavigator.initializeNavigationSession.

Fails on Android if the navigation session has not been initialized, and on iOS if the terms and conditions have not been accepted.

Implementation

Future<void> setNavigationUIEnabled(bool enabled) {
  return GoogleMapsNavigationPlatform.instance.viewAPI.setNavigationUIEnabled(
    viewId: getViewId(),
    enabled: enabled,
  );
}