ObserverRegistry class

Registry for model observers.

This class manages the registration and retrieval of observers for models.

Constructors

ObserverRegistry()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear<T extends KhademModel<T>>() → void
Clear all observers for a model type.
clearAll() → void
Clear all registered observers.
getObservers<T extends KhademModel<T>>() List<ModelObserver<T>>
Get all observers for a model type.
getObserversByType(Type modelType) List<ModelObserver<KhademModel>>
Get observers for a specific runtime type.
hasObservers<T extends KhademModel<T>>() bool
Check if a model type has any observers.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register<T extends KhademModel<T>>(ModelObserver<T> observer) → void
Register an observer for a model type.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance ObserverRegistry
Get the singleton instance of the registry.
no setter