dart-lang / fake_async

Fake asynchronous events for deterministic testing.
https://pub.dev/packages/fake_async
Apache License 2.0
90 stars 16 forks source link

Refactor a late final field without initializer #26

Closed natebosch closed 3 years ago

natebosch commented 3 years ago

This does require an extra field on the class, but by using an initializer expression with a late final field we avoid the appearance of a risky pattern.

natebosch commented 3 years ago

After some offline discussion, we think this is a fine pattern for private fields.