Commit b6012672 authored by Stefan Haslinger's avatar Stefan Haslinger

significant digits limited for avg heart rate

parent a8c82a7a
......@@ -4,6 +4,7 @@ import 'package:encrateia/utils/date_time_utils.dart';
import 'package:encrateia/utils/list_utils.dart';
import 'package:encrateia/models/event.dart';
import 'package:encrateia/models/activity.dart';
import 'package:encrateia/utils/num_utils.dart';
class Lap {
DbLap db;
......@@ -227,7 +228,7 @@ class Lap {
static String avgHeartRate({List<Event> records}) {
var heartRates = records.map((record) => record.db.heartRate).nonZeroInts();
return heartRates.mean().toString();
return heartRates.mean().toStringOrDashes(1);
}
static String maxHeartRate({List<Event> records}) {
......
import 'package:flutter/material.dart';
import 'package:encrateia/models/lap.dart';
import 'package:encrateia/models/event.dart';
import '../charts/lap_charts/lap_heart_rate_chart.dart';
import 'package:encrateia/widgets/charts/lap_charts/lap_heart_rate_chart.dart';
import 'package:encrateia/utils/icon_utils.dart';
class LapHeartRateWidget extends StatefulWidget {
......
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