contains method

bool contains(
  1. Object field
)

Whether the document has field, also when its value is null. field is a String (dots separate nested fields) or a FieldPath.

Implementation

bool contains(Object field) {
  final FieldPath fieldPath = _fieldPathOf(
    'DocumentSnapshot.contains',
    field,
  );
  return document?.getField(fieldPath.internalPath) != null;
}