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
|
|
@ -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),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue