Dart API Referencedart:coreExpando<T>

Expando<T> Interface

An Expando allows adding new properties to objects.

Constructors

Code const Expando([String name]) #

Creates a new Expando. The optional name is only used for debugging purposes and creating two different (non-const) Expandos with the same name yields two Expandos that work on different properties of the objects they are used on.

const Expando([String name]);

Methods

Code void operator []=(Object object, T value) #

Sets the value of this Expando's property on the given object. Properties can effectively be removed again by setting their value to null.

void operator []=(Object object, T value);

Code T operator [](Object object) #

Gets the value of this Expando's property on the given object. If the object hasn't been expanded, the method returns null.

T operator [](Object object);

Fields

Code final String name #

The name of the this Expando as passed to the constructor. If no name was passed to the constructor, the name is null.

final String name;