Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
Fix mounted checks (#1043)
Browse files Browse the repository at this point in the history
Fixes in preparation for https://dart-review.googlesource.com/c/sdk/+/330561.

The change referenced above tightens the `use_build_context_synchronously` lint to ensure that `mounted` is checked on the appropriate `BuildContext` or `State`. This change fixes up the gallery in preparation of this new enforcement.
  • Loading branch information
goderbauer authored Nov 2, 2023
1 parent a1cd1ab commit b702b3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pages/demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class _GalleryDemoPageState extends State<GalleryDemoPage>

if (await canLaunchUrlString(url)) {
await launchUrlString(url);
} else if (mounted) {
} else if (context.mounted) {
await showDialog<void>(
context: context,
builder: (context) {
Expand Down

0 comments on commit b702b3f

Please sign in to comment.