add method

void add(
  1. T value, {
  2. int weight = 1,
})

Implementation

void add(T value, {int weight = 1}) {
  final key = normalize(value);
  _counts.update(key, (c) => c + weight, ifAbsent: () => weight);
}