set static method

bool set(
  1. WidgetModel model,
  2. String id,
  3. String propertyOrFunction,
  4. List arguments,
  5. Scope scope,
)

Implementation

static bool set(WidgetModel model, String id, String propertyOrFunction,
    List<dynamic> arguments, Scope scope) {
  // value
  var value = elementAt(arguments, 0);

  // property - default is value
  // we can now use dot notation to specify the property
  // rather than pass it as an attribute
  var property = elementAt(arguments, 1);
  var key = Binding.toKey(id, property);

  // set the binding value
  scope.setObservable(key, value?.toString());

  return true;
}