[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:
@@ -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.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user