Avoid a `late final` field without initializer (#139)

This had been set in the constructor because it needs to reference
`this`. A new capability with `late final` files is to allow an
initializer expression referencing `this`. This approach also avoid
introducing a setter to the public API. The behavior difference is that
the `CancelableOperation` wont be instantiated until it is read, but
this is fine because `CancelableOperation` does not have any side
effects during initialization and it's only field is the
`CancelableCompleter`. Technically it's statically breaking to remove
the setter, but since it could never be called at runtime this is safe
to do.

Also initialize the `_inner` field where it is defined rather than in an
initializer list since there are not multiple constructors that would
assign different values.
3 files changed
tree: 3dc1bf0eee247c7ac911812d93e9f2821f346058
  1. .gitignore
  2. .test_config
  3. .travis.yml
  4. AUTHORS
  5. CHANGELOG.md
  6. CONTRIBUTING.md
  7. LICENSE
  8. README.md
  9. analysis_options.yaml
  10. lib/
  11. pubspec.yaml
  12. test/
README.md

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