EventRepositoryMixin<E> mixin

Default implementation of IEventRepository interface.

Uses StreamController in broadcast mode to manage event flow. Provides type-safe event filtering and resource management.

{@macro eventRepositoryMixin}

Example:

class MyRepository with EventRepositoryMixin<MyEvent> {}
Implemented types

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<E>
Returns a broadcast stream of all events.
no setteroverride

Methods

addEvent({required E event}) → void
Adds a new event to the repository's stream.
override
dispose() Future<void>
Closes the stream controller and releases resources.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
on<T extends E>() Stream<T>
Returns a filtered stream of events of specific type T. Uses runtime type checking and casting for type safety.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited