DefaultNavigationDashboardViewModel
Default implementation of DashboardViewModel that manages the navigation dashboard state.
This ViewModel:
Manages free roam mode state
Handles audio mode settings for navigation instructions
Tracks remaining route information (distance and time)
Provides indoor navigation information (floor and organization)
Manages show route and finish navigation handlers
Important: Call onCleared when this ViewModel is no longer needed to properly release resources, clear handlers, and close all connections to prevent memory leaks.
Parameters
Provides navigation state and route information updates.
Default state for free roam mode when navigation is disabled.
Properties
Observable state of audio navigation instructions. Indicates whether audio is on, off, or unavailable for the current route.
Observable state containing navigation dashboard information. Can be RemainingInfo with route details or IndoorInfo with floor/organization data. Null when navigation information is unavailable.
Observable handler for finishing the navigation session. This handler is invoked when the user chooses to end navigation.
Observable state indicating whether navigation is in free roam mode. In free roam mode, the user follows a route without turn-by-turn navigation guidance.
Observable state of indicates whether minimap is visible during navigation.
Observable handler for showing the route on the map. This handler is invoked when the user taps the "Show Route" button. Only available when not in free roam mode.
Observable handler for showing the minimap during navigation.
Functions
Handles audio button clicks to toggle navigation voice instructions. Toggles between On and Off states when audio is available.
Sets the handler to be invoked when the user chooses to finish navigation.
Sets the handler to be invoked when the user taps the "Show Route" button. The handler will only be active when not in free roam mode.
Handles minimap button clicks to toggle its visibility during navigation.