Commit e664c42c authored by Administrator's avatar Administrator

replacing icons

parent 22c578c4
......@@ -31,15 +31,15 @@ class ShowActivityScreen extends StatelessWidget {
isScrollable: true,
tabs: [
Tab(
icon: Icon(Icons.directions_run),
icon: MyIcon.overView,
text: "Overview",
),
Tab(
icon: Icon(Icons.timer),
icon: MyIcon.laps,
text: "Laps",
),
Tab(
icon: Icon(Icons.spa),
icon: MyIcon.heartRate,
text: "HR",
),
Tab(
......@@ -47,23 +47,23 @@ class ShowActivityScreen extends StatelessWidget {
text: "Power",
),
Tab(
icon: Icon(Icons.multiline_chart),
icon: MyIcon.powerDuration,
text: "Pow Dur",
),
Tab(
icon: Icon(Icons.vertical_align_bottom),
icon: MyIcon.groundTime,
text: "Grnd.Time",
),
Tab(
icon: Icon(Icons.airline_seat_recline_extra),
icon: MyIcon.legSpringStiffness,
text: "Leg Spr.Stiff.",
),
Tab(
icon: Icon(Icons.accessibility_new),
icon: MyIcon.formPower,
text: "Form Power",
),
Tab(
icon: Icon(Icons.pets),
icon: MyIcon.cadence,
text: "Cadence",
),
Tab(
......@@ -71,7 +71,7 @@ class ShowActivityScreen extends StatelessWidget {
text: "Vertical Oscillation",
),
Tab(
icon: Icon(Icons.storage),
icon: MyIcon.metaData,
text: "Metadata",
),
],
......
......@@ -5,29 +5,61 @@ import 'package:flutter/material.dart';
class MyIcon {
// A
static final amount = Icon(Icons.playlist_add); // number of records, ...
static final ascent = Icon(Icons.trending_up);
static final athlete = Icon(Icons.face);
static final average = Icon(Icons.filter_tilt_shift);
// C
static final cadence = Icon(Icons.pets);
static final calories = Icon(Icons.battery_charging_full);
static final climb = ascent;
static final cycling = Icon(Icons.directions_bike);
static final cycles = Icon(Icons.repeat);
// D
static final delete = Icon(Icons.delete);
static final distance = Icon(Icons.redo);
static final download = Icon(Icons.cloud_download);
// E
static final edit = Icon(Icons.edit);
static final event = Icon(Icons.event);
// F
static final formPower = Icon(Icons.ev_station);
// G
static final groundTime = Icon(Icons.vertical_align_bottom);
// H
static final heartRate = Icon(Icons.spa);
static final help = Icon(Icons.help);
// I
static final id = Icon(Icons.fingerprint);
static final intensity = Icon(Icons.power);
// L
static final laps = Icon(Icons.timer);
static final legSpringStiffness = Icon(Icons.airline_seat_recline_extra);
// M
static final metaData = Icon(Icons.storage);
// O
static final overView = Icon(Icons.landscape);
// P
static final parse = Icon(Icons.build);
static final position = Icon(Icons.map);
static final power = Icon(Icons.ev_station);
static final powerDuration = Icon(Icons.multiline_chart);
// R
static final repeats = Icon(Icons.loop);
static final running = Icon(Icons.directions_run);
// S
static final sdev = Icon(Icons.unfold_more); // standard deviation
static final show = Icon(Icons.remove_red_eye);
static final speed = Icon(Icons.shutter_speed);
static final sport = Icon(Icons.fitness_center);
static final stanceTime = cadence;
static final standardDeviation = Icon(Icons.unfold_more);
static final stravaDownload = Icon(Icons.cloud_download);
static final strides = Icon(Icons.directions_walk);
// T
static final temperature = Icon(Icons.ac_unit);
static final time = Icon(Icons.timer);
static final timeStamp = Icon(Icons.access_time);
static final title = Icon(Icons.title);
static final trainingEffect = Icon(Icons.fitness_center);
// V
static final verticalOscillation = Icon(Icons.unfold_more);
}
......@@ -43,7 +43,7 @@ class _ActivityFormPowerWidgetState extends State<ActivityFormPowerWidget> {
subtitle: Text("average form power"),
),
ListTile(
leading: MyIcon.sdev,
leading: MyIcon.standardDeviation,
title: Text(sdevFormPowerString),
subtitle: Text("standard deviation form power"),
),
......
......@@ -43,7 +43,7 @@ class _ActivityGroundTimeWidgetState extends State<ActivityGroundTimeWidget> {
subtitle: Text("average ground time"),
),
ListTile(
leading: MyIcon.sdev,
leading: MyIcon.standardDeviation,
title: Text(sdevGroundTimeString),
subtitle: Text("standard deviation ground time"),
),
......
......@@ -44,7 +44,7 @@ class ActivityHeartRateWidget extends StatelessWidget {
subtitle: Text("maximum heart rate"),
),
ListTile(
leading: MyIcon.sdev,
leading: MyIcon.standardDeviation,
title: Text(Lap.sdevHeartRate(records: records)),
subtitle: Text("standard deviation heart rate"),
),
......
......@@ -43,7 +43,7 @@ class _ActivityLegSpringStiffnessWidgetState extends State<ActivityLegSpringStif
subtitle: Text("average ground time"),
),
ListTile(
leading: MyIcon.sdev,
leading: MyIcon.standardDeviation,
title: Text(sdevLegSpringStiffnessString),
subtitle: Text("standard deviation ground time"),
),
......
......@@ -17,35 +17,35 @@ class ActivityMetadataWidget extends StatelessWidget {
padding: EdgeInsets.only(left: 25),
children: <Widget>[
ListTile(
leading: Icon(Icons.title),
leading: MyIcon.title,
title: Text(activity.db.name),
subtitle: Text("title")),
ListTile(
leading: Icon(Icons.access_time),
leading: MyIcon.timeStamp,
title: Text(DateFormat("dd MMM yyyy, h:mm:ss")
.format(activity.db.timeStamp)),
subtitle: Text('timestamp'),
),
ListTile(
leading: Icon(Icons.event),
leading: MyIcon.event,
title: Text(activity.db.event),
subtitle: Text('last event'),
),
if (activity.db.totalStrides != null)
ListTile(
leading: Icon(Icons.directions_walk),
leading: MyIcon.strides,
title: Text(activity.db.totalStrides.toString()),
subtitle: Text('total strides'),
),
if (activity.db.maxRunningCadence != null)
ListTile(
leading: Icon(Icons.pets),
leading: MyIcon.cadence,
title: Text("${activity.db.avgRunningCadence.round()} /"
" ${activity.db.maxRunningCadence}"),
subtitle: Text('avg / max running cadence'),
),
ListTile(
leading: Icon(Icons.ac_unit),
leading: MyIcon.temperature,
title: Text(
'${activity.db.avgTemperature}° / ${activity.db.maxTemperature}°'),
subtitle: Text('avg / max temperature'),
......@@ -56,29 +56,30 @@ class ActivityMetadataWidget extends StatelessWidget {
subtitle: Text('avg vertical oscillation'),
),
ListTile(
leading: Icon(Icons.repeat),
leading: MyIcon.cycles,
title: Text(activity.db.totalFractionalCycles.toString()),
subtitle: Text('total fractional cycles'),
),
ListTile(
leading: Icon(Icons.timer),
title:
Text(Duration(seconds: activity.db.totalElapsedTime).asString()),
leading: MyIcon.time,
title: Text(
Duration(seconds: activity.db.totalElapsedTime).asString()),
subtitle: Text('total elapsed time'),
),
ListTile(
leading: Icon(Icons.timer),
title: Text(Duration(seconds: activity.db.totalTimerTime).asString()),
leading: MyIcon.time,
title:
Text(Duration(seconds: activity.db.totalTimerTime).asString()),
subtitle: Text('total timer time'),
),
ListTile(
leading: Icon(Icons.fingerprint),
leading: MyIcon.id,
title:
Text("${activity.db.stravaId} / ${activity.db.serialNumber}"),
subtitle: Text("Strava / Garmin id"),
),
ListTile(
leading: Icon(Icons.directions_bike),
leading: MyIcon.sport,
title: Text(activity.db.type +
" / " +
activity.db.sport +
......@@ -87,58 +88,57 @@ class ActivityMetadataWidget extends StatelessWidget {
subtitle: Text('activity type / sport / sub sport'),
),
ListTile(
leading: Icon(Icons.event),
leading: MyIcon.event,
title: Text(activity.db.eventType + " / " + activity.db.trigger),
subtitle: Text('event type / trigger'),
),
ListTile(
leading: Icon(Icons.repeat),
leading: MyIcon.repeats,
title: Text("${activity.db.numLaps} / ${activity.db.numSessions}"),
subtitle: Text('number of laps / sessions'),
),
ListTile(
leading: Icon(Icons.linear_scale),
leading: MyIcon.cadence,
title: Text(activity.db.avgFractionalCadence.toStringAsFixed(2) +
" / " +
activity.db.maxFractionalCadence.toStringAsFixed(2)),
subtitle: Text('avg / max fractional cadence'),
),
ListTile(
leading: Icon(Icons.pets),
leading: MyIcon.time,
title: Text(
'${activity.db.avgStanceTime} ms / ${activity.db.avgStanceTimePercent} %'),
subtitle: Text('avg stance time / avg stance time percent'),
),
ListTile(
leading: Icon(Icons.map),
leading: MyIcon.position,
title: Text(activity.db.startPositionLong.semicirclesAsDegrees() +
" / " +
activity.db.startPositionLat.semicirclesAsDegrees()),
subtitle: Text('start position'),
),
ListTile(
leading: Icon(Icons.map),
leading: MyIcon.position,
title: Text(activity.db.necLong.semicirclesAsDegrees() +
" / " +
activity.db.necLat.semicirclesAsDegrees()),
subtitle: Text('north east corner'),
),
ListTile(
leading: Icon(Icons.map),
leading: MyIcon.position,
title: Text(activity.db.swcLong.semicirclesAsDegrees() +
" / " +
activity.db.swcLat.semicirclesAsDegrees()),
subtitle: Text('south west corner'),
),
ListTile(
leading: Icon(Icons.shutter_speed),
leading: MyIcon.speed,
title: Text((activity.db.avgSpeed * 3.6).toStringAsFixed(2) +
" km/h / " +
(activity.db.maxSpeed * 3.6).toStringAsFixed(2) +
" km/h"),
subtitle: Text('avg / max speed'),
),
],
),
);
......
......@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:encrateia/utils/date_time_utils.dart';
import 'package:intl/intl.dart';
import 'package:encrateia/models/activity.dart';
import 'package:encrateia/utils/icon_utils.dart';
class ActivityOverviewWidget extends StatelessWidget {
final Activity activity;
......@@ -16,55 +17,55 @@ class ActivityOverviewWidget extends StatelessWidget {
padding: EdgeInsets.only(left: 25),
children: <Widget>[
ListTile(
leading: Icon(Icons.access_time),
leading: MyIcon.timeStamp,
title: Text(DateFormat("dd MMM yyyy, h:mm:ss")
.format(activity.db.timeCreated)),
subtitle: Text('time created'),
),
ListTile(
leading: Icon(Icons.timer),
leading: MyIcon.time,
title: Text(Duration(seconds: activity.db.movingTime).asString()),
subtitle: Text('moving time'),
),
ListTile(
leading: Icon(Icons.redo),
leading: MyIcon.distance,
title:
Text('${(activity.db.distance / 1000).toStringAsFixed(2)} km'),
subtitle: Text('distance'),
),
ListTile(
leading: Icon(Icons.shutter_speed),
leading: MyIcon.speed,
title: Text(activity.db.avgSpeed.toPace() +
" / " +
activity.db.maxSpeed.toPace()),
subtitle: Text('avg / max pace'),
),
ListTile(
leading: Icon(Icons.battery_charging_full),
leading: MyIcon.calories,
title: Text('${activity.db.totalCalories} kcal'),
subtitle: Text('total calories'),
),
ListTile(
leading: Icon(Icons.landscape),
leading: MyIcon.climb,
title: Text(
"${activity.db.totalAscent} m - ${activity.db.totalDescent} m"
" = ${activity.db.totalAscent - activity.db.totalDescent} m"),
subtitle: Text('total ascent - descent = total climb'),
),
ListTile(
leading: Icon(Icons.spa),
leading: MyIcon.heartRate,
title: Text(
"${activity.db.avgHeartRate} bpm / ${activity.db.maxHeartRate} bpm"),
subtitle: Text('avg / max heart rate'),
),
ListTile(
leading: Icon(Icons.pets),
leading: MyIcon.cadence,
title: Text("${(activity.db.avgRunningCadence ?? 0 * 2).round()} spm / "
"${activity.db.maxRunningCadence ?? 0 * 2} spm"),
subtitle: Text('avg / max steps per minute'),
),
ListTile(
leading: Icon(Icons.fitness_center),
leading: MyIcon.trainingEffect,
title: Text(activity.db.totalTrainingEffect.toString()),
subtitle: Text('total training effect'),
),
......
......@@ -55,7 +55,7 @@ class _ActivityPowerWidgetState extends State<ActivityPowerWidget> {
subtitle: Text("maximum power"),
),
ListTile(
leading: MyIcon.sdev,
leading: MyIcon.standardDeviation,
title: Text(sdevPowerString),
subtitle: Text("standard deviation power"),
),
......
......@@ -43,7 +43,7 @@ class _ActivityStrydCadenceWidgetState extends State<ActivityStrydCadenceWidget>
subtitle: Text("average cadence"),
),
ListTile(
leading: MyIcon.sdev,
leading: MyIcon.standardDeviation,
title: Text(sdevStrydCadenceString),
subtitle: Text("standard deviation cadence"),
),
......
......@@ -43,7 +43,7 @@ class _ActivityVerticalOscillationWidgetState extends State<ActivityVerticalOsci
subtitle: Text("average vertical oscillation"),
),
ListTile(
leading: MyIcon.sdev,
leading: MyIcon.standardDeviation,
title: Text(sdevVerticalOscillationString),
subtitle: Text("standard deviation vertical oscillation"),
),
......
......@@ -44,7 +44,7 @@ class _LapFormPowerWidgetState extends State<LapFormPowerWidget> {
subtitle: Text("average form power"),
),
ListTile(
leading: MyIcon.sdev,
leading: MyIcon.standardDeviation,
title: Text(sdevFormPowerString),
subtitle: Text("standard deviation form power"),
),
......
......@@ -44,7 +44,7 @@ class _LapGroundTimeWidgetState extends State<LapGroundTimeWidget> {
subtitle: Text("average ground time"),
),
ListTile(
leading: MyIcon.sdev,
leading: MyIcon.standardDeviation,
title: Text(sdevGroundTimeString),
subtitle: Text("standard deviation ground time"),
),
......
......@@ -42,7 +42,7 @@ class LapHeartRateWidget extends StatelessWidget {
subtitle: Text("maximum heart rate"),
),
ListTile(
leading: MyIcon.sdev,
leading: MyIcon.standardDeviation,
title: Text(Lap.sdevHeartRate(records: records)),
subtitle: Text("standard deviation heart rate"),
),
......
......@@ -44,7 +44,7 @@ class _LapLegSpringStiffnessWidgetState extends State<LapLegSpringStiffnessWidge
subtitle: Text("average ground time"),
),
ListTile(
leading: MyIcon.sdev,
leading: MyIcon.standardDeviation,
title: Text(sdevLegSpringStiffnessString),
subtitle: Text("standard deviation ground time"),
),
......
......@@ -17,27 +17,27 @@ class LapMetadataWidget extends StatelessWidget {
padding: EdgeInsets.only(left: 25),
children: <Widget>[
ListTile(
leading: Icon(Icons.repeat_one),
leading: MyIcon.repeats,
title: Text('Lap ${lap.index}'),
),
ListTile(
leading: Icon(Icons.access_time),
leading: MyIcon.timeStamp,
title: Text(
DateFormat("dd MMM yyyy, h:mm:ss").format(lap.db.timeStamp)),
subtitle: Text('timestamp'),
),
ListTile(
leading: Icon(Icons.event),
leading: MyIcon.event,
title: Text(lap.db.event),
subtitle: Text("event"),
),
ListTile(
leading: Icon(Icons.directions_bike),
leading: MyIcon.sport,
title: Text(lap.db.sport + ' / ' + lap.db.subSport),
subtitle: Text('sport / sub sport'),
),
ListTile(
leading: Icon(Icons.event),
leading: MyIcon.event,
title:
Text(lap.db.eventType + " / " + lap.db.eventGroup.toString()),
subtitle: Text('event type / group'),
......@@ -48,65 +48,65 @@ class LapMetadataWidget extends StatelessWidget {
subtitle: Text('avg vertical oscillation'),
),
ListTile(
leading: Icon(Icons.timer),
leading: MyIcon.time,
title: Text(Duration(seconds: lap.db.totalElapsedTime).asString()),
subtitle: Text('total elapsed time'),
),
ListTile(
leading: Icon(Icons.timer),
leading: MyIcon.time,
title: Text(Duration(seconds: lap.db.totalTimerTime).asString()),
subtitle: Text('total timer time'),
),
ListTile(
leading: Icon(Icons.pets),
leading: MyIcon.stanceTime,
title: Text(
'${lap.db.avgStanceTime} ms / ${lap.db.avgStanceTimePercent} %'),
subtitle: Text('avg stance time / avg stance time percent'),
),
ListTile(
leading: Icon(Icons.event),
leading: MyIcon.event,
title: Text(lap.db.lapTrigger),
subtitle: Text('lap trigger'),
),
ListTile(
leading: Icon(Icons.ac_unit),
leading: MyIcon.temperature,
title:
Text('${lap.db.avgTemperature}° / ${lap.db.maxTemperature}°'),
subtitle: Text('avg / max temperature'),
),
ListTile(
leading: Icon(Icons.linear_scale),
leading: MyIcon.cadence,
title: Text(lap.db.avgFractionalCadence.toStringAsFixed(2) +
" / " +
lap.db.maxFractionalCadence.toStringAsFixed(2)),
subtitle: Text('avg / max fractional cadence'),
),
ListTile(
leading: Icon(Icons.repeat),
leading: MyIcon.repeats,
title: Text(lap.db.totalFractionalCycles.toString()),
subtitle: Text('total fractional cycles'),
),
ListTile(
leading: Icon(Icons.map),
leading: MyIcon.position,
title: Text(lap.db.startPositionLong.semicirclesAsDegrees() +
" / " +
lap.db.startPositionLat.semicirclesAsDegrees()),
subtitle: Text('start position'),
),
ListTile(
leading: Icon(Icons.map),
leading: MyIcon.position,
title: Text(lap.db.endPositionLong.semicirclesAsDegrees() +
" / " +
lap.db.endPositionLat.semicirclesAsDegrees()),
subtitle: Text('end position'),
),
ListTile(
leading: Icon(Icons.power),
leading: MyIcon.intensity,
title: Text(lap.db.intensity.toString()),
subtitle: Text('intensity'),
),
ListTile(
leading: Icon(Icons.shutter_speed),
leading: MyIcon.speed,
title: Text((lap.db.avgSpeed * 3.6).toStringAsFixed(2) +
" km/h / " +
(lap.db.maxSpeed * 3.6).toStringAsFixed(2) +
......
......@@ -57,7 +57,7 @@ class _LapPowerWidgetState extends State<LapPowerWidget> {
subtitle: Text("maximum power"),
),
ListTile(
leading: MyIcon.sdev,
leading: MyIcon.standardDeviation,
title: Text(sdevPowerString),
subtitle: Text("standard deviation power"),
),
......
......@@ -44,7 +44,7 @@ class _LapStrydCadenceWidgetState extends State<LapStrydCadenceWidget> {
subtitle: Text("average cadence"),
),
ListTile(
leading: MyIcon.sdev,
leading: MyIcon.standardDeviation,
title: Text(sdevStrydCadenceString),
subtitle: Text("standard deviation cadence"),
),
......
......@@ -44,7 +44,7 @@ class _LapVerticalOscillationWidgetState extends State<LapVerticalOscillationWid
subtitle: Text("average vertical oscillation"),
),
ListTile(
leading: MyIcon.sdev,
leading: MyIcon.standardDeviation,
title: Text(sdevVerticalOscillationString),
subtitle: Text("standard deviation vertical oscillation"),
),
......
......@@ -3,6 +3,7 @@ import 'package:encrateia/models/activity.dart';
import 'package:encrateia/models/lap.dart';
import 'package:encrateia/screens/show_lap_screen.dart';
import 'package:encrateia/utils/date_time_utils.dart';
import 'package:encrateia/utils/icon_utils.dart';
class LapsListWidget extends StatelessWidget {
final Activity activity;
......@@ -19,28 +20,28 @@ class LapsListWidget extends StatelessWidget {
dataRowHeight: kMinInteractiveDimension * 0.60,
columnSpacing: 20,
columns: <DataColumn>[
const DataColumn(
label: Icon(Icons.loop),
DataColumn(
label: MyIcon.repeats,
tooltip: 'Lap',
numeric: true,
),
const DataColumn(
DataColumn(
label: Text("bpm"),
tooltip: 'heartrate',
numeric: true,
),
const DataColumn(
DataColumn(
label: Text("min:ss"),
tooltip: 'pace',
numeric: true,
),