operator [] method

dynamic operator [](
  1. String key
)

used for retrieving the _id field (internally)

Implementation

dynamic operator [](String key) {
  if (key != '_id') throw UnimplementedError();
  return id;
}