Skip to content

Commit

Permalink
use state.mounted instead of context.mounted to check if the screen i…
Browse files Browse the repository at this point in the history
…s in the widget tree
  • Loading branch information
farook-edev committed Jan 30, 2025
1 parent a581209 commit 74bf88f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flutter/lib/ui/settings/resources_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class _ResourcesScreen extends State<ResourcesScreen> {
await state.loadResources(downloadMissing: true);
} on SocketException {
await state.clearCache();
if (!context.mounted) return;
if (!mounted) return;
await showErrorDialog(
context, <String>[l10n.dialogNoInternetError]);
}
Expand Down

0 comments on commit 74bf88f

Please sign in to comment.