get method

Object? get(
  1. Object field
)

The value of field, or null if there is no such field or document. Never converted.

field is a String (dots separate nested fields) or a FieldPath.

Implementation

Object? get(Object field) {
  final model.FieldPath path = _fieldPathOf(
    'DocumentSnapshot.get',
    field,
  ).internalPath;
  final FieldValue? value = document?.getField(path);
  return value == null ? null : _convertValue(value);
}