ProviderModelUseSubscription<T> class final

ProviderModelUseSubscription is a class that represents a subscription to a ProviderModel's ProviderModelVariables.

It keeps track of the variables that the subscription is interested in and calls a callback function whenever any of these variables change.

This class is not meant to be instantiated directly. Instead, use ProviderModel.use.

Example usage:

final subscription = myModel.use((model) {
  print(model.myVariable.unsafeValue);
});

Properties

callback → void Function(T model)
The callback function to be called whenever any of the variables change.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel() → void
Cancels the subscription. Stops listening to all variables and removes the subscription from the ProviderModel.
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