Merge pull request #549 from Dieterbe/nutrition-tweaks

tiny nutrition fixes
This commit is contained in:
Roland Geider
2024-04-12 20:50:39 +02:00
committed by GitHub
5 changed files with 6 additions and 6 deletions

View File

@@ -155,7 +155,7 @@ class MyApp extends StatelessWidget {
HomeTabsScreen.routeName: (ctx) => HomeTabsScreen(),
MeasurementCategoriesScreen.routeName: (ctx) => MeasurementCategoriesScreen(),
MeasurementEntriesScreen.routeName: (ctx) => MeasurementEntriesScreen(),
NutritionScreen.routeName: (ctx) => NutritionScreen(),
NutritionalPlansScreen.routeName: (ctx) => NutritionalPlansScreen(),
NutritionalDiaryScreen.routeName: (ctx) => NutritionalDiaryScreen(),
NutritionalPlanScreen.routeName: (ctx) => NutritionalPlanScreen(),
WeightScreen.routeName: (ctx) => WeightScreen(),

View File

@@ -64,7 +64,7 @@ class _HomeTabsScreenState extends State<HomeTabsScreen> with SingleTickerProvid
final _screenList = [
DashboardScreen(),
WorkoutPlansScreen(),
NutritionScreen(),
NutritionalPlansScreen(),
WeightScreen(),
const GalleryScreen(),
];

View File

@@ -25,7 +25,7 @@ import 'package:wger/widgets/core/app_bar.dart';
import 'package:wger/widgets/nutrition/forms.dart';
import 'package:wger/widgets/nutrition/nutritional_plans_list.dart';
class NutritionScreen extends StatelessWidget {
class NutritionalPlansScreen extends StatelessWidget {
static const routeName = '/nutrition';
@override

View File

@@ -58,7 +58,7 @@ class NutritionalPlansList extends StatelessWidget {
icon: const Icon(Icons.delete),
tooltip: AppLocalizations.of(context).delete,
onPressed: () async {
// Delete workout from DB
// Delete the plan from DB
await showDialog(
context: context,
builder: (BuildContext contextDialog) {
@@ -80,7 +80,7 @@ class NutritionalPlansList extends StatelessWidget {
TextStyle(color: Theme.of(context).colorScheme.error),
),
onPressed: () {
// Confirmed, delete the workout
// Confirmed, delete the plan
_nutritionProvider.deletePlan(currentPlan.id!);
// Close the popup

View File

@@ -73,7 +73,7 @@ void main() {
locale: Locale(locale),
localizationsDelegates: AppLocalizations.localizationsDelegates,
supportedLocales: AppLocalizations.supportedLocales,
home: NutritionScreen(),
home: NutritionalPlansScreen(),
routes: {
FormScreen.routeName: (ctx) => FormScreen(),
},