observeProperty<T> method

Future<T> observeProperty<T>(
  1. String propertyKey
)

observe a property for changes
will be added to event for property changes

Implementation

Future<T> observeProperty<T>(String propertyKey) {
  // create the id assigned with this property
  // +1 because time-pos (which has the id 0) is not included in this object
  int prop_id = observedProperties.length + 1;
  // store the id into the hash map, such that it can be retrieved later if
  // the property should be unobserved
  observedProperties[propertyKey] = prop_id;
  return command<T>('observe_property', [prop_id, propertyKey]);
}