feat: add reset to default for routing algorithm settings (#622)
- Add Reset button in routing settings with Icons.restart_alt - Extract default values as constants in AppSettings to avoid duplication - Add translations for all 18 supported languages - Update documentation in settings.md
This commit is contained in:
1 parent
ac28dac575
commit
3032be9bad
42 files changed
+377
-39
No files matched your search
@@ -623,6 +623,38 @@ class AppSettingsScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
const Divider(height: 1),
|
||||
ListTile(
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 4,
|
||||
),
|
||||
leading: const Icon(Icons.restart_alt, size: 24),
|
||||
title: Text(
|
||||
context.l10n.appSettings_resetRoutingToDefault,
|
||||
),
|
||||
subtitle: Text(
|
||||
context
|
||||
.l10n
|
||||
.appSettings_resetRoutingToDefaultSubtitle,
|
||||
),
|
||||
trailing: const Icon(
|
||||
Icons.keyboard_arrow_right,
|
||||
size: 18,
|
||||
),
|
||||
onTap: () async {
|
||||
await settingsService.resetRoutingSettingsToDefault();
|
||||
if (context.mounted) {
|
||||
showDismissibleSnackBar(
|
||||
context,
|
||||
content: Text(
|
||||
context.l10n.appSettings_routingResetToDefault,
|
||||
),
|
||||
duration: const Duration(seconds: 2),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user