Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use_build_context_synchronously: handle asynchrony in for- and do-statements better #4554

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

srawlins
Copy link
Member

If an await is found in a for-statement or a do-statement (or a while-statement, already implemented), even if it is after a reference to a BuildContext, the reference is not safe. This implements that behavior.

There are new unit tests, and some legacy tests are moved.

@github-actions github-actions bot added the set-flutter Affects a rule in the recommended Flutter rule set label Jul 11, 2023
@coveralls
Copy link

Coverage Status

coverage: 96.728% (-0.04%) from 96.77% when pulling bc5db4d on build-context-b into 411a3f5 on main.

@srawlins srawlins requested a review from scheglov July 12, 2023 00:28
@srawlins srawlins merged commit 2f1ff02 into main Jul 12, 2023
6 checks passed
@srawlins srawlins deleted the build-context-b branch July 12, 2023 00:32
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
set-flutter Affects a rule in the recommended Flutter rule set
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants