incrementInPath method

Future<void> incrementInPath(
  1. String path,
  2. num value, [
  3. TransactionId? transactionId
])

Increments the value at the given path by the given value. The given value may be both positive and negative.

Implementation

Future<void> incrementInPath(String path, num value,
        [TransactionId? transactionId]) =>
    _dataManager.applyOutgoingMutation(
        Mutation.update(
            squidDocIdObj: parseSquidDocId(squidDocId),
            properties: {
              path: [PropertyMutation.applyNumericFn(value)]
            }),
        transactionId);