From c2817637184e4940607efd4486c6bdcaf859a7da Mon Sep 17 00:00:00 2001 From: Amix Date: Thu, 9 Jul 2026 21:11:04 -0600 Subject: [PATCH] fix(ui): use State's context instead of stale parameter in CSV import (#460) _importCsv guards every other post-await BuildContext use with the State's own `mounted`/`this.context`, but one spot read the l10n strings off the function's `context` parameter instead, requiring a `// ignore: use_build_context_synchronously` to silence the analyzer. Switching to `this.context` matches the surrounding guard and lets the lint verify the usage on its own, so the suppression is no longer needed. --- lib/screens/home_tab.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/screens/home_tab.dart b/lib/screens/home_tab.dart index c203dfa1..9102aea8 100644 --- a/lib/screens/home_tab.dart +++ b/lib/screens/home_tab.dart @@ -966,8 +966,7 @@ class _HomeTabState extends ConsumerState if (!mounted) return; - // ignore: use_build_context_synchronously - final l10n = context.l10n; + final l10n = this.context.l10n; final options = await showDialog<_CsvImportOptions>( context: this.context,