CancelableOperation<T>.fromValue constructor

CancelableOperation<T>.fromValue(
  1. T value
)

Creates a CancelableOperation which completes to value.

Canceling this operation does nothing.

Calling this constructor is equivalent to creating a CancelableCompleter and completing it with value.

Implementation

factory CancelableOperation.fromValue(T value) =>
    (CancelableCompleter<T>()..complete(value)).operation;