Commit c7467c0d authored by Administrator's avatar Administrator

merged

parents e618cabc 9c195013
......@@ -30,8 +30,10 @@ class _ActivityFormPowerWidgetState extends State<ActivityFormPowerWidget> {
Widget build(context) {
if (records.length > 0) {
var formPowerRecords = records
.where(
(value) => value.db.formPower != null && value.db.formPower > 0)
.where((value) =>
value.db.formPower != null &&
value.db.formPower > 0 &&
value.db.formPower < 200)
.toList();
if (formPowerRecords.length > 0) {
......
......@@ -30,7 +30,12 @@ class _ActivityPowerRatioWidgetState extends State<ActivityPowerRatioWidget> {
Widget build(context) {
if (records.length > 0) {
var powerRecords = records
.where((value) => value.db.power != null && value.db.power > 0)
.where((value) =>
value.db.power != null &&
value.db.power > 0 &&
value.db.formPower != null &&
value.db.formPower > 0 &&
value.db.formPower < 200)
.toList();
if (powerRecords.length > 0) {
......
......@@ -4,6 +4,7 @@ import 'package:encrateia/models/event.dart';
import 'package:encrateia/utils/num_utils.dart';
import '../charts/actitvity_charts/activity_power_chart.dart';
import 'package:encrateia/utils/icon_utils.dart';
import 'package:encrateia/utils/date_time_utils.dart';
class ActivityPowerWidget extends StatefulWidget {
final Activity activity;
......@@ -33,6 +34,7 @@ class _ActivityPowerWidgetState extends State<ActivityPowerWidget> {
var powerRecords = records
.where((value) => value.db.power != null && value.db.power > 100)
.toList();
var lastRecord = powerRecords.last;
if (powerRecords.length > 0) {
return ListTileTheme(
......@@ -67,6 +69,13 @@ class _ActivityPowerWidgetState extends State<ActivityPowerWidget> {
title: Text(powerRecords.length.toString()),
subtitle: Text("number of measurements"),
),
ListTile(
leading: Text("🕵️‍♀️", style: TextStyle(fontSize: 25)),
title: Text(lastRecord.db.positionLong.semicirclesAsDegrees() +
" / " +
lastRecord.db.positionLat.semicirclesAsDegrees()),
subtitle: Text("findYourStryd (last power record)"),
),
],
),
);
......
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