Skip to content

unawaited_futures not working in forEach #57102

@mgenware

Description

@mgenware

Describe the issue

Try calling an async func in forEach:

image

Expected behavior

  • If forEach supports async callbacks, if should report unawaited_futures
  • If not, it should warn that the async function param might not be awaited

Additional context

Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64, locale
en-US)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestdevexp-linterIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.linter-false-negativeIssues related to lint rules that fail to report a problem.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions