SimpleEventLoggerModel

class SimpleEventLoggerModel(val eventLogger: SimpleEventLogger, coroutineScope: CoroutineScope)

A UI state holder for SimpleEventLogger designed for Compose Multiplatform.

This model observes the underlying logger and exposes a reactive StateFlow of events. The eventLogger is exposed publicly to allow direct invocation of its suspending mutation functions (like addEvent or deleteEvent) from the UI's coroutine scope.

Constructors

Link copied to clipboard
constructor(eventLogger: SimpleEventLogger, coroutineScope: CoroutineScope)

Properties

Link copied to clipboard

The underlying persistent event logger.

Link copied to clipboard
val events: StateFlow<List<Event>?>

A reactive stream of the currently stored events.