fix: formatting

This commit is contained in:
2026-07-29 01:42:34 +02:00
parent 521c8f8c4e
commit 50e6fca9d1
32 changed files with 501 additions and 575 deletions
+41 -25
View File
@@ -46,7 +46,7 @@ class _SettingsScreenViewState extends State<SettingsScreenView> {
}
Future<void> _loadVersion() async {
final version = await currentVersion();
final version = await currentVersion();
if (!mounted) return;
@@ -87,7 +87,9 @@ class _SettingsScreenViewState extends State<SettingsScreenView> {
void _showError(String message) {
if (!mounted) return;
ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text(message)));
ScaffoldMessenger.of(
context,
).showSnackBar(SnackBar(content: Text(message)));
}
Future<void> _enablePin() async {
@@ -168,8 +170,10 @@ class _SettingsScreenViewState extends State<SettingsScreenView> {
),
body: Builder(
builder: (context) {
final isLoading = settingsViewModel.isLoading || pinLockViewModel.isLoading;
final hasLoaded = settingsViewModel.hasLoaded && pinLockViewModel.hasLoaded;
final isLoading =
settingsViewModel.isLoading || pinLockViewModel.isLoading;
final hasLoaded =
settingsViewModel.hasLoaded && pinLockViewModel.hasLoaded;
if (isLoading && !hasLoaded) {
return const Center(
@@ -231,7 +235,8 @@ class _SettingsScreenViewState extends State<SettingsScreenView> {
AppThemeMode.light => 'Light',
AppThemeMode.dark => 'Dark',
}),
onChanged: (value) => Navigator.pop(context, value),
onChanged: (value) =>
Navigator.pop(context, value),
);
}).toList(),
),
@@ -265,14 +270,10 @@ class _SettingsScreenViewState extends State<SettingsScreenView> {
child: Center(
child: Text(
'Version $_appVersion',
style: Theme.of(context)
.textTheme
.bodySmall
?.copyWith(
color: Theme.of(context)
.colorScheme
.onSurface
.withValues(alpha: 0.5),
style: Theme.of(context).textTheme.bodySmall?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface.withValues(alpha: 0.5),
),
),
),
@@ -306,9 +307,9 @@ class _SettingsScreenViewState extends State<SettingsScreenView> {
} catch (e) {
if (!mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('Update check failed: $e')),
);
ScaffoldMessenger.of(
context,
).showSnackBar(SnackBar(content: Text('Update check failed: $e')));
}
}
@@ -349,9 +350,9 @@ class _SettingsScreenViewState extends State<SettingsScreenView> {
} catch (e) {
if (!mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text("Update failed: $e")),
);
ScaffoldMessenger.of(
context,
).showSnackBar(SnackBar(content: Text("Update failed: $e")));
}
},
child: const Text("Update"),
@@ -391,7 +392,9 @@ class _SettingsSection extends StatelessWidget {
decoration: BoxDecoration(
color: scheme.onSurface.withValues(alpha: 0.04),
borderRadius: BorderRadius.circular(14),
border: Border.all(color: scheme.onSurface.withValues(alpha: 0.06)),
border: Border.all(
color: scheme.onSurface.withValues(alpha: 0.06),
),
),
clipBehavior: Clip.antiAlias,
child: Column(children: children),
@@ -427,12 +430,19 @@ class _SettingsTile extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
child: Row(
children: [
Icon(icon, size: 22, color: scheme.onSurface.withValues(alpha: 0.7)),
Icon(
icon,
size: 22,
color: scheme.onSurface.withValues(alpha: 0.7),
),
const SizedBox(width: 14),
Expanded(
child: Text(
title,
style: TextStyle(fontWeight: FontWeight.w600, color: scheme.onSurface),
style: TextStyle(
fontWeight: FontWeight.w600,
color: scheme.onSurface,
),
),
),
if (subtitle != null) ...[
@@ -440,7 +450,10 @@ class _SettingsTile extends StatelessWidget {
const SizedBox(width: 4),
],
if (onTap != null)
Icon(Icons.chevron_right_rounded, color: scheme.onSurface.withValues(alpha: 0.3)),
Icon(
Icons.chevron_right_rounded,
color: scheme.onSurface.withValues(alpha: 0.3),
),
],
),
),
@@ -475,7 +488,10 @@ class _SettingsSwitchTile extends StatelessWidget {
Expanded(
child: Text(
title,
style: TextStyle(fontWeight: FontWeight.w600, color: scheme.onSurface),
style: TextStyle(
fontWeight: FontWeight.w600,
color: scheme.onSurface,
),
),
),
Switch(value: value, onChanged: onChanged),
@@ -483,4 +499,4 @@ class _SettingsSwitchTile extends StatelessWidget {
),
);
}
}
}