class PathObserver


A data-bound path starting from a view-model or model object, for example foo.bar.baz.

When open is called, this will observe changes to the object and any intermediate object along the path, and send updated values accordingly. When close is called it will stop observing the objects.

This class is used to implement Node.bind and similar functionality in the template_binding package.

Implements
  • Bindable

Constructors

PathObserver(Object object, [path])

Observes path on object for changes. This returns an object that can be used to get the changes and get/set the value at this path.

Properties

hashCode → int

Get a hash code for this object.

read-only, inherited
path PropertyPath

read-only
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited
value → dynamic

Sets the value at this path.

write-only

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

close() → void

Stops future notifications and frees the reference to the callback passed to open, so its memory can be collected even if this Bindable is alive.

inherited
deliver() → void

Deliver changes. Typically this will perform dirty-checking, if any is needed.

inherited
noSuchMethod(Invocation invocation) → dynamic

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

inherited
open(callback) → dynamic

Initiates observation and returns the initial value. The callback will be passed the updated value, and may optionally be declared to take a second argument, which will contain the previous value.

toString() → String

Returns a string representation of this object.

inherited