operator []= method

void operator []=(
  1. Object property,
  2. dynamic value
)

Sets the value associated with property on the proxied JavaScript object.

The type of property must be either String or num.

Implementation

void operator []=(Object property, dynamic value) {
  if (property is! String && property is! num) {
    throw ArgumentError('property is not a String or num');
  }
  throw UnsupportedError(
      'JavaScript interop is not supported in this runtime.');
}