decrement method
update field
realtime value
that tells the server to decrement the field
’s current value
by the given value
.
Implementation
Future<void> decrement({
required String field,
String? docId,
num value = 1,
}) async {
return await this
.update(docId: docId, data: {field: FieldValue.increment(-value)});
}