Open mit-mit opened 3 years ago
+1 on adding a method side opt out for unawaited_futures. We see a very large # of calls to unawaited
in g3 (about 10% of all calls to awaited). Likely a small # of method side opt outs can reduce this # significantly.
@goderbauer: do any Flutter APIs spring to mind that you'd want to tag as unwaitable? it'd be handy to have some concrete examples to drive the discussion.
The Future-returning APIs on AnimationController and Navigator are the most common examples, things like AnimationController.forward() / AnimationController.reverse() and Navigator.push() as well as its similarly named friends.
Corresponding issue to discussion an annotation in pkg:meta
here: https://github.com/dart-lang/sdk/issues/46218.
@pq to create a proposal for how this would work
We had initially selected
unawaited_futures
for inclusion in core lints, however ran into some issues that need resolving first, including:Navigator
andAnimationController
methods, maybe others)