You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lint: Directly ignore use_build_context_synchronously, where needed
This workaround recently stopped working: this inverted form of
early return no longer persuades the lint rule not to complain
when we go on to use `context`.
Not sure exactly what change caused that; it happened with a new
Flutter version from master/main in recent weeks, presumably due
to a new Dart SDK version rolling through there.
Since the workaround is no longer effective, just switch to the
straightforward early return, and use a lint-ignore comment
pointing at the underlying issue that causes the lint rule to
complain there:
https://github.com/dart-lang/linter/issues/4007
That issue was recently fixed in the linter repo's main branch.
The fix rolled yesterday into the Dart SDK:
dart-lang/sdk@f09ce66
but that hasn't quite yet rolled through to Flutter.
Once it does, we'll be able to cut these.
0 commit comments