abstract class Observable


Represents an object with observable properties. This is used by data in model-view architectures to notify interested parties of changes to the object's properties (fields or getter/setter pairs).

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

Static Methods

dirtyCheck() → void

Performs dirty checking of objects that inherit from Observable. This scans all observed objects using mirrors and determines if any fields have changed. If they have, it delivers the changes for the object.

Constructors

Observable()

Properties

changes → Stream<List<ChangeRecord>>

The stream of change records to this object. Records will be delivered asynchronously.

read-only
hashCode → int

Get a hash code for this object.

read-only, inherited
hasObservers → bool

True if this object has any observers, and should call notifyChange for changes.

read-only
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

deliverChanges() → bool

Synchronously deliver pending changes. Returns true if any records were delivered, otherwise false.

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
notifyChange(ChangeRecord record) → void

Notify observers of a change.

notifyPropertyChange(Symbol field, Object oldValue, Object newValue) → dynamic

Notify that the field name of this object has been changed.

toString() → String

Returns a string representation of this object.

inherited