MessageViewModel

ViewModel interface for providing messages during navigation.

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 message: StateFlow<Message>

Observable state containing current message. Emits updates when message changes.

Functions

Link copied to clipboard
abstract fun onCleared()

Releases resources when the view model is no longer needed.