exist method
Checks if a document with the specified field
and value
exists in the collection.
Returns true
if the document exists, otherwise false
.
Implementation
Future<bool> exist(String field, Object value) async {
return await getCount(field: field, value: value) > 0;
}