operator []= method

void operator []=(
  1. String? propertyName,
  2. dynamic value
)

Sets a value by property name in backing.

Implementation

void operator []=(String? propertyName, dynamic value) {
  final prop = properties[propertyName];
  if (prop == null) {
    throw ArgumentError("Invalid property access for '${entity.name}'. "
        "Property '$propertyName' does not exist on '${entity.name}'.");
  }

  backing.setValueForProperty(prop, value);
}