Skip to content

Commit 107995f

Browse files
pqCommit Queue
authored and
Commit Queue
committed
[diagnostics] use_build_context_synchronously message fix
Picking up abandoned change: https://dart-review.googlesource.com/c/sdk/+/395461 Change-Id: Id5a876dec73870bb379e9ad89226669272ebf673 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396382 Commit-Queue: Phil Quitslund <[email protected]> Reviewed-by: Marya Belanger <[email protected]>
1 parent c69d325 commit 107995f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/analyzer/tool/diagnostics/diagnostics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29271,7 +29271,7 @@ The analyzer produces this diagnostic when a `BuildContext` is referenced
2927129271
by a `StatefulWidget` after an asynchronous gap without first checking the
2927229272
`mounted` property.
2927329273

29274-
Storing a `BuildContext` for later use can lead to difficult to diagnose
29274+
Storing a `BuildContext` for later use can lead to difficult-to-diagnose
2927529275
crashes. Asynchronous gaps implicitly store a `BuildContext`, making them
2927629276
easy to overlook for diagnosis.
2927729277

pkg/linter/messages.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13161,7 +13161,7 @@ LintCode:
1316113161
by a `StatefulWidget` after an asynchronous gap without first checking the
1316213162
`mounted` property.
1316313163
13164-
Storing a `BuildContext` for later use can lead to difficult to diagnose
13164+
Storing a `BuildContext` for later use can lead to difficult-to-diagnose
1316513165
crashes. Asynchronous gaps implicitly store a `BuildContext`, making them
1316613166
easy to overlook for diagnosis.
1316713167
@@ -13213,7 +13213,7 @@ LintCode:
1321313213
deprecatedDetails: |-
1321413214
**DON'T** use `BuildContext` across asynchronous gaps.
1321513215
13216-
Storing `BuildContext` for later usage can easily lead to difficult to diagnose
13216+
Storing `BuildContext` for later usage can easily lead to difficult-to-diagnose
1321713217
crashes. Asynchronous gaps are implicitly storing `BuildContext` and are some of
1321813218
the easiest to overlook when writing code.
1321913219

0 commit comments

Comments
 (0)