NeuronAtom<T> constructor
- T value, {
- bool equals(
- T a,
- T b
- T guard(
- T current,
- T next
- VoidCallback? onListen,
- VoidCallback? onCancel,
Creates a NeuronAtom with an initial value.
Implementation
NeuronAtom(
T value, {
this.equals,
this.guard,
this.onListen,
this.onCancel,
}) : _value = value,
_initialValue = value {
_finalizer.attach(this, () {
if (!_disposed) {
_disposed = true;
_listeners.clear();
}
}, detach: _finalizerToken);
}