From 5795b0a4e8a7f23521b80537f0af3e86b0773dbd Mon Sep 17 00:00:00 2001 From: Crondung <1922635@stud.hs-mannheim.de> Date: Mon, 6 Mar 2023 00:39:50 +0100 Subject: [PATCH] add Workout historylist --- lib/widgets/view_form/workout_view.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/widgets/view_form/workout_view.dart b/lib/widgets/view_form/workout_view.dart index d0787e6..3e904e6 100644 --- a/lib/widgets/view_form/workout_view.dart +++ b/lib/widgets/view_form/workout_view.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:smoke_cess_app/models/workout.dart'; +import 'package:smoke_cess_app/widgets/history_list_widget.dart'; import 'package:smoke_cess_app/widgets/line_chart_widget.dart'; import 'package:syncfusion_flutter_charts/charts.dart'; import 'package:smoke_cess_app/providers/tasks_provider.dart'; @@ -24,6 +25,13 @@ class WorkoutView extends StatelessWidget { xValueMapper: (Workout value, _) => value.date, yValueMapper: (Workout value, _) => value.motivationAfter) ]), + HistoryList( + history: tasksModel.workoutHistory, + dateSelector: (Workout workout) => workout.date, + entryDataSelector: (Workout workout) => + '${workout.motivationBefore} : ${workout.motivationAfter}', + icon: Icons.sports_score_outlined, + ) ], ); }