refactor: Enable lint use_build_context_synchronously
This commit is contained in:
parent
a3fc1bff01
commit
3296c0d92d
50 changed files with 490 additions and 293 deletions
|
|
@ -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),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue