forwardMapboxNavigation

fun forwardMapboxNavigation(attach: (MapboxNavigation) -> Unit, detach: (MapboxNavigation) -> Unit): MapboxNavigationObserver

This extension removes boilerplate from a class that needs to use MapboxNavigation, and it makes your class appear as if it implements MapboxNavigationObserver without exposing the functions.

val navigationObserver = mapboxNavigationForward(this::onAttached, this::onDetached)
private fun onAttached(mapboxNavigation: MapboxNavigation)
private fun onDetached(mapboxNavigation: MapboxNavigation)