changeValue method

  1. @override
Future<PolicyPresentationModel?> changeValue(
  1. String documentId,
  2. String fieldName,
  3. num changeByThisValue
)
override

Implementation

@override
Future<PolicyPresentationModel?> changeValue(
    String documentId, String fieldName, num changeByThisValue) {
  var change = FieldValue.increment(changeByThisValue);
  return policyPresentationCollection
      .doc(documentId)
      .update({fieldName: change}).then((v) => get(documentId));
}