Add CancelableOperation.fromValue (#225)

This is useful in tests which stub behavior for an API which returns
`CancelableOperation`. It has more clear semantics and is shorter than
`CancelableOperation.fromFuture(Future.value(...))`.

Take a `T` instead of a more general `FutureOr<T>` to satisfy both cases
because it allows simplifying the API with no `onCancel` support.
2 files changed
tree: 3d47299243732a002a76716df4cac9189cbbb967
  1. .github/
  2. lib/
  3. test/
  4. .gitignore
  5. analysis_options.yaml
  6. AUTHORS
  7. CHANGELOG.md
  8. CONTRIBUTING.md
  9. LICENSE
  10. pubspec.yaml
  11. README.md
README.md

Dart CI pub package package publisher

Contains utility classes in the style of dart:async to work with asynchronous computations.