[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 <pquitslund@google.com>
Reviewed-by: Marya Belanger <mbelanger@google.com>
This commit is contained in:
pq
2024-11-19 22:12:43 +00:00
committed by Commit Queue
parent c69d32577f
commit 107995fcdb
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -29271,7 +29271,7 @@ The analyzer produces this diagnostic when a `BuildContext` is referenced
by a `StatefulWidget` after an asynchronous gap without first checking the
`mounted` property.
Storing a `BuildContext` for later use can lead to difficult to diagnose
Storing a `BuildContext` for later use can lead to difficult-to-diagnose
crashes. Asynchronous gaps implicitly store a `BuildContext`, making them
easy to overlook for diagnosis.
+2 -2
View File
@@ -13161,7 +13161,7 @@ LintCode:
by a `StatefulWidget` after an asynchronous gap without first checking the
`mounted` property.
Storing a `BuildContext` for later use can lead to difficult to diagnose
Storing a `BuildContext` for later use can lead to difficult-to-diagnose
crashes. Asynchronous gaps implicitly store a `BuildContext`, making them
easy to overlook for diagnosis.
@@ -13213,7 +13213,7 @@ LintCode:
deprecatedDetails: |-
**DON'T** use `BuildContext` across asynchronous gaps.
Storing `BuildContext` for later usage can easily lead to difficult to diagnose
Storing `BuildContext` for later usage can easily lead to difficult-to-diagnose
crashes. Asynchronous gaps are implicitly storing `BuildContext` and are some of
the easiest to overlook when writing code.