IndoorViewModel

interface IndoorViewModel

ViewModel interface for the indoor levels control.

Provides the indoor state and allows the user to interact with the control by selecting levels or checking level marks.

Implementations push updates as the map's indoor state changes.

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 indoorState: StateFlow<IndoorState>

Observable state of the indoor levels control.

Functions

Link copied to clipboard
abstract fun isLevelMarked(index: Int): Boolean

Checks whether the level at the given index is marked.

Link copied to clipboard
abstract fun onCleared()

Releases resources when the view model is no longer needed.

Link copied to clipboard
abstract fun selectLevel(index: Int?)

Called when the user selects a level.