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

@ -50,15 +50,17 @@ abstract class PlatformInfos {
}
static Future<void> showDialog(BuildContext context) async {
final l10n = L10n.of(context);
final version = await PlatformInfos.getVersion();
if (!context.mounted) return;
showAboutDialog(
context: context,
children: [
Text(L10n.of(context).versionWithNumber(version)),
Text(l10n.versionWithNumber(version)),
TextButton.icon(
onPressed: () => launchUrlString(AppConfig.sourceCodeUrl),
icon: const Icon(Icons.source_outlined),
label: Text(L10n.of(context).sourceCode),
label: Text(l10n.sourceCode),
),
Builder(
builder: (innerContext) {
@ -68,7 +70,7 @@ abstract class PlatformInfos {
Navigator.of(innerContext).pop();
},
icon: const Icon(Icons.list_outlined),
label: Text(L10n.of(context).logs),
label: Text(l10n.logs),
);
},
),
@ -80,7 +82,7 @@ abstract class PlatformInfos {
Navigator.of(innerContext).pop();
},
icon: const Icon(Icons.settings_applications_outlined),
label: Text(L10n.of(context).advancedConfigs),
label: Text(l10n.advancedConfigs),
);
},
),