add Workout historylist

main
Julian Gegner 2023-03-06 00:39:50 +01:00
parent e91caaa5ba
commit 5795b0a4e8
1 changed files with 8 additions and 0 deletions

View File

@ -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<Workout>(
history: tasksModel.workoutHistory,
dateSelector: (Workout workout) => workout.date,
entryDataSelector: (Workout workout) =>
'${workout.motivationBefore} : ${workout.motivationAfter}',
icon: Icons.sports_score_outlined,
)
],
);
}