map method Null safety

Histogram map(
  1. String bucketFor(
    1. String
    )
)

Rebuckets the histogram given the new bucketing rule.

Implementation

Histogram map(String Function(String) bucketFor) {
  return Histogram.fromIterable(buckets.keys,
      sizeOf: (key) => buckets[key]!,
      bucketFor: bucketFor,
      bucketInfo: bucketInfo);
}