operator [] method

dynamic operator [](
  1. Object field
)

Accesses a field in the document data.

Parameters:

  • field: The field to access.

Returns: The value of the field.

Example:

var value = snapshot['fieldName'];

Implementation

dynamic operator [](Object field) {
  return get(field);
}