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.
This commit is contained in:
Amix
2026-07-09 21:11:04 -06:00
committed by GitHub
parent e97ecf38c5
commit c281763718
+1 -2
View File
@@ -966,8 +966,7 @@ class _HomeTabState extends ConsumerState<HomeTab>
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,