Model class abstract
Base class for a Model
- Inheritance
-
- Object
- ChangeNotifier
- Model
- Implementers
Constructors
- Model()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
cancelSubscriptions(
) → void -
Cancel all listener subscriptions.
inherited
-
createFutureProperty<
T> (Future< T> initialValue, {VoidCallback? listener}) → FutureProperty<T> - Creates a FutureProperty and adds a listener.
-
createProperty<
T> (T initialValue, {VoidCallback? listener}) → ValueNotifier< T> - Creates a Property and adds a listener to it.
-
createStreamProperty<
T> (Stream< T> initialValue, {VoidCallback? listener}) → StreamProperty<T> - Creates a StreamProperty and adds a listener.
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
override
-
get<
T extends Object> ({BuildContext? context, String? name, Filter? filter}) → T -
Gets (but does not listen to) a single service or inherited widget.
inherited
-
listenTo<
T extends ChangeNotifier> ({BuildContext? context, T? notifier, String? name, Filter? filter, required void listener()}) → T -
Locates a single service or inherited model and adds a listener ('subscribes') to it.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
register<
T extends Object> (BuildContext context, {String? name}) → void -
Registers an inherited object.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unregister<
T extends Object> (BuildContext context, {String? name}) → void -
Unregisters models registered with
Observer.register
.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited