BytesMeter class

A transformer that reports byte throughput while passing data through.

Inheritance

Constructors

BytesMeter({ProgressCallback? onProgress, Duration sample = const Duration(seconds: 1), ByteConverter? total})
Creates a transformer that samples progress every sample interval and reports via onProgress. If total is provided, percentage and ETA are also computed.

Properties

hashCode → int
The hash code for this object.
no setterinherited
onProgress → ProgressCallback?
Called when a sample is ready.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sample → Duration
Sampling interval.
final
total → ByteConverter?
Optional known total payload for progress percentage.
final

Methods

bind(Stream<List<int>> stream) → Stream<List<int>>
Transforms the provided stream.
override
cast<RS, RT>() → StreamTransformer<RS, RT>
Provides a StreamTransformer<RS, RT> view of this stream transformer.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited