operator [] method

T? operator [](
  1. dynamic key
)

Returns the item specified by key.

This method accepts a String as a key or an ItemSerializable, where its id is going to be used.

Implementation

T? operator [](key) {
  return _items[_getKey(key)];
}