FormatterSnapshot.rate constructor
FormatterSnapshot.rate({
- required Iterable<
DataRate> rateSamples, - required Iterable<
ByteFormatOptions> options, - String sampleLabeler(
- DataRate sample
- String optionLabeler(
- ByteFormatOptions option
Builds a snapshot for DataRate samples.
Implementation
FormatterSnapshot.rate({
required Iterable<DataRate> rateSamples,
required Iterable<ByteFormatOptions> options,
String Function(DataRate sample)? sampleLabeler,
String Function(ByteFormatOptions option)? optionLabeler,
}) : _kind = _SnapshotKind.rate,
_sizeSamples = const [],
_rateSamples = List<DataRate>.from(rateSamples, growable: false),
_options = List<ByteFormatOptions>.from(options, growable: false),
_sizeLabeler = _defaultSizeLabeler,
_rateLabeler = sampleLabeler ?? _defaultRateLabeler,
_optionLabeler = optionLabeler ?? _defaultOptionLabeler;