Commit a9164811 authored by Stefan Haslinger's avatar Stefan Haslinger

extend overview tabs by avg power, power/heart rate, sort order

parent c9bfb349
......@@ -16,23 +16,11 @@ class ActivityOverviewWidget extends StatelessWidget {
child: ListView(
padding: EdgeInsets.only(left: 25),
children: <Widget>[
ListTile(
leading: MyIcon.timeStamp,
title: Text(DateFormat("dd MMM yyyy, h:mm:ss")
.format(activity.db.timeCreated)),
subtitle: Text('time created'),
),
ListTile(
leading: MyIcon.time,
title: Text(Duration(seconds: activity.db.movingTime ?? 0).asString()),
subtitle: Text('moving time'),
),
ListTile(
leading: MyIcon.distance,
title:
Text('${(activity.db.distance / 1000).toStringAsFixed(2)} km'),
subtitle: Text('distance'),
),
ListTile(
leading: MyIcon.speed,
title: Text(activity.db.avgSpeed.toPace() +
......@@ -40,11 +28,41 @@ class ActivityOverviewWidget extends StatelessWidget {
activity.db.maxSpeed.toPace()),
subtitle: Text('avg / max pace'),
),
ListTile(
leading: MyIcon.heartRate,
title: Text(
"${activity.db.avgHeartRate} bpm / ${activity.db.maxHeartRate} bpm"),
subtitle: Text('avg / max heart rate'),
),
ListTile(
leading: MyIcon.power,
title: Text(
"${activity.db.avgPower.toStringAsFixed(1)} W"),
subtitle: Text('avg power'),
),
ListTile(
leading: MyIcon.power,
title:
Text("${(activity.db.avgPower / activity.db.avgHeartRate).toStringAsFixed(2)} W/bpm"),
subtitle: Text('power / heart rate'),
),
ListTile(
leading: MyIcon.distance,
title:
Text('${(activity.db.distance / 1000).toStringAsFixed(2)} km'),
subtitle: Text('distance'),
),
ListTile(
leading: MyIcon.calories,
title: Text('${activity.db.totalCalories} kcal'),
subtitle: Text('total calories'),
),
ListTile(
leading: MyIcon.timeStamp,
title: Text(DateFormat("dd MMM yyyy, h:mm:ss")
.format(activity.db.timeCreated)),
subtitle: Text('time created'),
),
ListTile(
leading: MyIcon.climb,
title: Text(
......@@ -52,12 +70,6 @@ class ActivityOverviewWidget extends StatelessWidget {
" = ${activity.db.totalAscent - activity.db.totalDescent} m"),
subtitle: Text('total ascent - descent = total climb'),
),
ListTile(
leading: MyIcon.heartRate,
title: Text(
"${activity.db.avgHeartRate} bpm / ${activity.db.maxHeartRate} bpm"),
subtitle: Text('avg / max heart rate'),
),
ListTile(
leading: MyIcon.cadence,
title: Text("${(activity.db.avgRunningCadence ?? 0 * 2).round()} spm / "
......
......@@ -16,6 +16,29 @@ class LapOverviewWidget extends StatelessWidget {
child: ListView(
padding: EdgeInsets.only(left: 25),
children: <Widget>[
ListTile(
leading: MyIcon.speed,
title: Text(lap.db.avgSpeed.toPace() + " / " + lap.db.maxSpeed.toPace()),
subtitle: Text('avg / max pace'),
),
ListTile(
leading: MyIcon.heartRate,
title:
Text("${lap.db.avgHeartRate} bpm / ${lap.db.maxHeartRate} bpm"),
subtitle: Text('avg / max heart rate'),
),
ListTile(
leading: MyIcon.power,
title:
Text("${lap.db.avgPower.toStringAsFixed(1)} W"),
subtitle: Text('avg power'),
),
ListTile(
leading: MyIcon.power,
title:
Text("${(lap.db.avgPower / lap.db.avgHeartRate).toStringAsFixed(2)} WW/bpm"),
subtitle: Text('power / heart rate'),
),
ListTile(
leading: MyIcon.timeStamp,
title: Text(
......@@ -28,11 +51,6 @@ class LapOverviewWidget extends StatelessWidget {
Text('${(lap.db.totalDistance / 1000).toStringAsFixed(2)} km'),
subtitle: Text('distance'),
),
ListTile(
leading: MyIcon.speed,
title: Text(lap.db.avgSpeed.toPace() + " / " + lap.db.maxSpeed.toPace()),
subtitle: Text('avg / max pace'),
),
ListTile(
leading: MyIcon.calories,
title: Text('${lap.db.totalCalories} kcal'),
......@@ -44,12 +62,6 @@ class LapOverviewWidget extends StatelessWidget {
" = ${lap.db.totalAscent - lap.db.totalDescent} m"),
subtitle: Text('total ascent - descent = total climb'),
),
ListTile(
leading: MyIcon.heartRate,
title:
Text("${lap.db.avgHeartRate} bpm / ${lap.db.maxHeartRate} bpm"),
subtitle: Text('avg / max heart rate'),
),
ListTile(
leading: MyIcon.cadence,
title: Text("${(lap.db.avgRunningCadence ?? 0 * 2).round()} spm / "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment