at method

V? at(
  1. dynamic key, {
  2. required int index,
})

Returns the value associated with key at the column index.

final lookup = WebSocketManagerLookup();

final key = MultiKey(['a', 'b', 'c']);
lookup[key] = 1000;

print(lookup['a']);                       // 1000
print(lookup['b']);                       // 1000
print(lookup['e']);                       // null

Implementation

V? at(final dynamic key, { required final int index }) {
  predicate(final K multiKey) => multiKey.containsAt(key, index: index);
  return _find(predicate)?.value;
}