Progress<T> constructor
Progress<T> (
- FutureOr<
void> callback(- T value
Creates an instance of Progress.
Parameters:
callback: A callback that will be invoked when the report method is called.
The callback function can be defined with any required parameter type.
The function report must be called with the same parameter type.
Implementation
Progress(FutureOr<void> Function(T value) callback)
: _callback = callback,
_zone = Zone.current;