increment method

  1. @override
void increment(
  1. String name,
  2. int value
)
inherited

Increments counter by given value.

  • name a counter name of Increment type.
  • value a value to add to the counter.

Implementation

@override
void increment(String name, int value) {
  var counter = get(name, CounterType.Increment);
  counter.count = counter.count != null ? counter.count! + value : value;
  _update();
}