mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Merge pull request #549 from Dieterbe/nutrition-tweaks
tiny nutrition fixes
This commit is contained in:
@@ -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(),
|
||||
|
||||
@@ -64,7 +64,7 @@ class _HomeTabsScreenState extends State<HomeTabsScreen> with SingleTickerProvid
|
||||
final _screenList = [
|
||||
DashboardScreen(),
|
||||
WorkoutPlansScreen(),
|
||||
NutritionScreen(),
|
||||
NutritionalPlansScreen(),
|
||||
WeightScreen(),
|
||||
const GalleryScreen(),
|
||||
];
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -73,7 +73,7 @@ void main() {
|
||||
locale: Locale(locale),
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
home: NutritionScreen(),
|
||||
home: NutritionalPlansScreen(),
|
||||
routes: {
|
||||
FormScreen.routeName: (ctx) => FormScreen(),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user