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. lib/
  2. test/
  3. .gitignore
  4. .test_config
  5. .travis.yml
  6. analysis_options.yaml
  7. AUTHORS
  8. CHANGELOG.md
  9. CONTRIBUTING.md
  10. LICENSE
  11. pubspec.yaml
  12. README.md
README.md

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