increment method

  1. @override
DocumentTransactionBuilder increment(
  1. String key,
  2. num value, {
  3. List<CounterUpdaterInterval> intervals = const [],
})
override

Increments the value specified by key by value.

It is also possible to specify a minus value for value.

By specifying intervals, it is possible to perform aggregation separated by periods.

Implementation

@override
DocumentTransactionBuilder increment(
  String key,
  num value, {
  List<CounterUpdaterInterval> intervals = const [],
}) {
  _enableCounter = true;
  _counterKey = key;
  _counterValue = value;
  _counterIntervals = intervals;
  return this;
}