CloseNotifier mixin

Lets the lifecycle OWNER (core) react when a model built by a separate engine package closes. The package constructs the model; core registers a reset callback via addCloseListener; the concrete model fires the listeners from its own close()'s finally. Best practice: the engine createModel(spec, config) contract stays a pure factory — no lifecycle callback leaks into the contract that third-party engines implement.

Listeners fire EXACTLY ONCE provided close() is idempotent (if (_isClosed) return;). fireCloseListeners clears the list so a second invocation is a no-op even without the guard.

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

addCloseListener(VoidCallback listener) → void
fireCloseListeners() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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