DefaultFinishRouteViewModel

Default implementation of FinishRouteViewModel. Manages the state and behavior of the finish route UI control with parking option.

Constructors

Link copied to clipboard
constructor(map: Map)

Properties

Link copied to clipboard
open override val finishHandler: StateFlow<() -> Unit?>

Observable state holding the handler to be invoked when the user taps the finish button.

Link copied to clipboard
open override val parkingMode: StateFlow<FinishRouteParkingMode>

Observable state of the parking feature. Indicates whether parking spots are shown on the map.

Functions

Link copied to clipboard
open override fun onCleared()

Cleans up resources when the ViewModel is no longer needed. Closes parking control model and all registered closeables.

Link copied to clipboard
open override fun onParkingButtonClicked()

Handles the parking button click event. Toggles parking visibility when the parking feature is available.

Link copied to clipboard
open override fun setFinishHandler(handler: () -> Unit?)

Sets the handler for the finish button. This handler will be invoked when the user wants to finish navigation.

Link copied to clipboard
open override fun setParkingButtonAvailability(availability: Boolean)

Updates the availability of the parking button.