Skip to content

method-side opt-out for unawaited_futures #58348

@goderbauer

Description

@goderbauer

Flutter has some API methods (like Navigator.push, AnimationController.forward, AnimationController.reverse) that return a Future, but in a lot of cases it is perfectly normal to just drop that Future on the floor. The unawaited_futures lint creates a lot of noise there, especially in tests.

It would be nice if there's an API-side opt-out for that lint where we can annotate the methods mentioned above with @unawaitedOk (or similar) and the lint would ignore it if a Future returned by those annotated methods is unawaited.

/cc @pq @Hixie @mit-mit @munificent @devoncarew

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packagetype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions