ChangeNotifier class abstract

A notifier that can trigger notifyListeners to trigger rebuilds. It has access to Ref for fast development.

Inheritance
Implementers

Constructors

ChangeNotifier()

Properties

customDebugLabel String?
Override this to provide a custom debug label.
no setterinherited
debugLabel String
A label to be used in debug messages and by the RefenaTracingPage.
no setterinherited
dependencies Set<BaseNotifier>
A collection of notifiers that this notifier depends on.
finalinherited
dependents Set<BaseNotifier>
A collection of notifiers that depend on this notifier. They will be disposed when this notifier is disposed.
finalinherited
disposed bool
Whether this notifier is disposed.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
provider → BaseProvider<BaseNotifier<void>, void>?
The provider that created this notifier. This is only available after the initialization.
no setterinherited
ref Ref
no setterinherited
requireBuildContext bool
If this is true, initializing must be done by ViewModelBuilder of the refena_flutter package. This flag is needed to throw an exception if the user forgets to use ViewModelBuilder.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state ↔ void
Gets the current state.
getter/setter pairinherited-getter

Methods

addListener(Rebuildable rebuildable, ListenerConfig<void> config) → void
inherited
cleanupListeners() → void
inherited
describeState(void state) String
Override this to provide a customized description of the state. This is used by the built-in observers for improved logging.
inherited
dispose() → void
This is called on Ref.dispose. You can override this method to dispose resources.
inherited
getListeners() List<Rebuildable>
inherited
getStream() Stream<NotifierEvent<void>>
inherited
init() → void
Override postInit to run code after the notifier is initialized.
internalSetup(ProxyRef ref, BaseProvider<BaseNotifier<void>, void>? provider) → void
Handles the actual initialization of the notifier. Calls init internally.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call this method whenever the state changes. This will notify all listeners.
postInit() → void
Override this to provide a custom post initialization. The initial state is already set at this point.
inherited
removeListener(Rebuildable rebuildable) → void
inherited
toString() String
A string representation of this object.
inherited
updateShouldNotify(void prev, void next) bool
Override this if you want to a different kind of equality.

Operators

operator ==(Object other) bool
Subclasses should not override this method. It is used internally by dependencies and dependents.
inherited