operator [] method Null safety

dynamic operator [](
  1. Type type
)

Gets a runtime object for type.

Callers typically invoke this method, passing their runtimeType in order to retrieve their runtime object.

It is important to note that a runtime object must exist for every class that extends a class that has a runtime. Use MirrorContext.getSubclassesOf when compiling.

In other words, if the type Base has a runtime and the type Subclass extends Base, Subclass must also have a runtime. The runtime objects for both Subclass and Base must be the same type.

Implementation

dynamic operator [](Type type) => runtimes[type];