W3cubDocs

/Dart 2

operator []= method

void operator []= (dynamic index, E value)
override

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

The type of property must be either String or num.

Implementation

void operator []=(dynamic index, E value) {
  // TODO(justinfagnani): fix the semantics for non-ints
  // dartbug.com/14605
  if (index is num && index == index.toInt()) {
    _checkIndex(index);
  }
  super[index] = value;
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-js/JsArray/operator_put.html