SpeedInfoViewModel

ViewModel interface for managing speed information during navigation. Provides a speed-related data including current speed, speed limits, and speed camera warnings.

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

Link copied to clipboard
abstract val speedInfoState: StateFlow<SpeedInfoState>

Observable state containing current speed information. Emits updates when speed, speed limit, or camera proximity changes.

Functions

Link copied to clipboard
abstract fun onCleared()

Releases resources when the view model is no longer needed.