More polish and i18n work

Also make sure that we don't update the routine while editing, since
some of the changes could pull the rug under our feet and felt strange.
Now there's a manual refresh button for the resulting routine
This commit is contained in:
Roland Geider
2024-11-16 22:11:05 +01:00
parent 74990330da
commit 8020bd21b6
9 changed files with 177 additions and 73 deletions

View File

@@ -30,6 +30,7 @@ class SettingsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final i18n = AppLocalizations.of(context);
final exerciseProvider = Provider.of<ExercisesProvider>(context, listen: false);
final nutritionProvider = Provider.of<NutritionPlansProvider>(context, listen: false);
@@ -40,7 +41,12 @@ class SettingsPage extends StatelessWidget {
body: ListView(
children: [
ListTile(
title: Text(AppLocalizations.of(context).settingsExerciseCacheDescription),
title: Text(
i18n.settingsCacheTitle,
style: Theme.of(context).textTheme.headlineSmall,
)),
ListTile(
title: Text(i18n.settingsExerciseCacheDescription),
trailing: IconButton(
key: const ValueKey('cacheIconExercises'),
icon: const Icon(Icons.delete),
@@ -49,7 +55,7 @@ class SettingsPage extends StatelessWidget {
if (context.mounted) {
final snackBar = SnackBar(
content: Text(AppLocalizations.of(context).settingsCacheDeletedSnackbar),
content: Text(i18n.settingsCacheDeletedSnackbar),
);
ScaffoldMessenger.of(context).showSnackBar(snackBar);