Observable<C extends ChangeRecord> class Null safety

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. [...]
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
hasObservers bool
True if this object has any observers.
@Deprecated('Use ChangeNotifier instead to have this method available'), read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

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

Operators

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