FinishRouteViewModel
Manages the state and behavior of the finish route UI control. This control is displayed when navigation reaches the destination.
Thread Safety
This ViewModel is not thread-safe and must only be accessed from the Main thread.
All methods must be called from the Main (UI) thread
All StateFlow properties emit values on the Main thread
Concurrent access from multiple threads may lead to undefined behavior
Inheritors
Properties
Observable state holding the handler for the finish button. When null, the finish button is hidden.
Observable state of the parking feature. Indicates whether parking spots are shown on the map. When set to Unavailable, the parking button will be hidden.
Functions
Called when the user clicks the parking button. Toggles the parking mode between Enabled and Disabled.
Sets the handler for the finish button. This handler will be invoked when the user wants to finish navigation.
Updates the availability of the parking button. When set to false, the parking mode will be set to Unavailable.