Skip to content

Add Add await fix for for_in_of_invalid_type when Future<Iterable>/Stream #60648

Closed
@FMorschel

Description

@FMorschel

Consider:

Future<void> foo(Future<List<int>> future) async {
  final controller = StreamController<int>();
  for (final i in controller.stream) {}
  for (final l in future) {}
}

For both cases, we could have the Add await fix. The first case only needs to insert it before for.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-quick-fixIssues with analysis server (quick) fixes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions