operator [] method

V? operator [](
  1. dynamic key
)

Operator overload to access values by key.

Returns null if the key doesn't exist.

Time complexity: O(1)

Example:

final map = FastMap<String, int>();
map.set('count', 42);
print(map['count']); // 42
print(map['missing']); // null

Implementation

V? operator [](dynamic key) => get(key as K);