refactor: Enable lint use_build_context_synchronously

This commit is contained in:
Christian Kußowski 2026-03-25 10:42:17 +01:00
commit 3296c0d92d
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
50 changed files with 490 additions and 293 deletions

View file

@ -10,6 +10,7 @@ abstract class UpdateNotifier {
static Future<void> showUpdateSnackBar(BuildContext context) async {
final scaffoldMessenger = ScaffoldMessenger.of(context);
final l10n = L10n.of(context);
final currentVersion = await PlatformInfos.getVersion();
final store = await SharedPreferences.getInstance();
final storedVersion = store.getString(versionStoreKey);
@ -20,9 +21,9 @@ abstract class UpdateNotifier {
SnackBar(
duration: const Duration(seconds: 30),
showCloseIcon: true,
content: Text(L10n.of(context).updateInstalled(currentVersion)),
content: Text(l10n.updateInstalled(currentVersion)),
action: SnackBarAction(
label: L10n.of(context).changelog,
label: l10n.changelog,
onPressed: () => launchUrlString(AppConfig.changelogUrl),
),
),