add Workout historylist
parent
e91caaa5ba
commit
5795b0a4e8
|
@ -1,6 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:smoke_cess_app/models/workout.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:smoke_cess_app/widgets/line_chart_widget.dart';
|
||||||
import 'package:syncfusion_flutter_charts/charts.dart';
|
import 'package:syncfusion_flutter_charts/charts.dart';
|
||||||
import 'package:smoke_cess_app/providers/tasks_provider.dart';
|
import 'package:smoke_cess_app/providers/tasks_provider.dart';
|
||||||
|
@ -24,6 +25,13 @@ class WorkoutView extends StatelessWidget {
|
||||||
xValueMapper: (Workout value, _) => value.date,
|
xValueMapper: (Workout value, _) => value.date,
|
||||||
yValueMapper: (Workout value, _) => value.motivationAfter)
|
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,
|
||||||
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue