Progress<T> constructor

Progress<T>(
  1. FutureOr<void> callback(
    1. T value
    )
)

Creates an instance of Progress.

Parameters:

  • callback: A callback function that will be called 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;