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: Fix not-mounted-or case #4560

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

srawlins
Copy link
Member

This issue was reported internally. The motivating test case was:

  if (!context.mounted || 1 == 2) {
  } else {
    context /* ref */;
  }

The only way to get into the else branch is if context.mounted is true.

@srawlins srawlins requested a review from scheglov July 13, 2023 08:44
@github-actions github-actions bot added the set-flutter Affects a rule in the recommended Flutter rule set label Jul 13, 2023
@coveralls
Copy link

Coverage Status

coverage: 96.73%. remained the same when pulling 5ce85df on ubcs-not-mounted-or into aed089e on main.

@srawlins srawlins merged commit 47cac27 into main Jul 13, 2023
6 checks passed
@srawlins srawlins deleted the ubcs-not-mounted-or branch July 13, 2023 16:40
@mernen
Copy link

mernen commented Aug 19, 2023

I was about to report this issue, as it is a regression in Flutter 3.13. Is it planned for a hotfix release?

@srawlins
Copy link
Member Author

No, I don't believe we will release this in a hotfix.

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.

4 participants