Observable<C extends ChangeRecord> class abstract

Represents an object with observable state or properties.

The interface does not require any specific technique to implement observability. You may implement it in the following ways:

  • Extend or mixin ChangeNotifier
  • Implement the interface yourself and provide your own implementation
Implementers

Constructors

Observable()

Properties

changes Stream<List<C>?>
Emits a list of changes when the state of the object changes.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasObservers bool
True if this object has any observers.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

deliverChanges() bool
If hasObservers, synchronously emits changes that have been queued.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyChange([C? change]) → void
Schedules change to be delivered.
observed() → void
May override to be notified when changes is first observed.
toString() String
A string representation of this object.
inherited
unobserved() → void
May override to be notified when changes is no longer observed.

Operators

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