Commit 8ffda4f8 authored by Stefan Haslinger's avatar Stefan Haslinger

show only buttons for views with data on lap level

parent fecc65ad
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_secure_storage","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"package_info","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.1/","dependencies":[]},{"name":"path_provider","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11/","dependencies":[]},{"name":"shared_preferences","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.8/","dependencies":[]},{"name":"sqflite","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.1/","dependencies":[]},{"name":"uni_links","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.5.0/","dependencies":[]}],"android":[{"name":"flutter_secure_storage","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"package_info","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.1/","dependencies":[]},{"name":"path_provider","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11/","dependencies":[]},{"name":"shared_preferences","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.8/","dependencies":[]},{"name":"sqflite","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.1/","dependencies":[]},{"name":"uni_links","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.5.0/","dependencies":[]}],"macos":[{"name":"package_info","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.1/","dependencies":[]},{"name":"path_provider_macos","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+3/","dependencies":[]},{"name":"shared_preferences_macos","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+10/","dependencies":[]},{"name":"sqflite","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.1/","dependencies":[]},{"name":"url_launcher_macos","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.0.1+7/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+2/","dependencies":[]},{"name":"shared_preferences_linux","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_linux-0.0.2+1/","dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_linux-0.0.1+1/","dependencies":[]}],"windows":[],"web":[{"name":"shared_preferences_web","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+7/","dependencies":[]},{"name":"url_launcher_web","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-0.1.2/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_secure_storage","dependencies":[]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"uni_links","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_linux","url_launcher_macos"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}],"date_created":"2020-08-18 11:18:43.928363","version":"1.20.1"}
\ No newline at end of file
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_secure_storage","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"package_info","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.1/","dependencies":[]},{"name":"path_provider","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11/","dependencies":[]},{"name":"shared_preferences","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.8/","dependencies":[]},{"name":"sqflite","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.1/","dependencies":[]},{"name":"uni_links","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.5.0/","dependencies":[]}],"android":[{"name":"flutter_secure_storage","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"package_info","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.1/","dependencies":[]},{"name":"path_provider","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.11/","dependencies":[]},{"name":"shared_preferences","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.8/","dependencies":[]},{"name":"sqflite","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.1/","dependencies":[]},{"name":"uni_links","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.5.0/","dependencies":[]}],"macos":[{"name":"package_info","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/package_info-0.4.1/","dependencies":[]},{"name":"path_provider_macos","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+3/","dependencies":[]},{"name":"shared_preferences_macos","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+10/","dependencies":[]},{"name":"sqflite","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.1/","dependencies":[]},{"name":"url_launcher_macos","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.0.1+7/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-0.0.1+2/","dependencies":[]},{"name":"shared_preferences_linux","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_linux-0.0.2+1/","dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_linux-0.0.1+1/","dependencies":[]}],"windows":[],"web":[{"name":"shared_preferences_web","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+7/","dependencies":[]},{"name":"url_launcher_web","path":"/daten/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-0.1.2/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_secure_storage","dependencies":[]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"uni_links","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_linux","url_launcher_macos"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}],"date_created":"2020-08-18 12:18:21.465260","version":"1.20.1"}
\ No newline at end of file
......@@ -42,86 +42,97 @@ class ShowLapScreen extends StatelessWidget {
context: context,
nextWidget: ({Lap lap}) => LapOverviewWidget(lap: lap),
),
navigationButton(
title: 'Heart Rate',
color: MyColor.navigate,
icon: MyIcon.heartRate,
context: context,
nextWidget: ({Lap lap}) => LapHeartRateWidget(lap: lap),
),
navigationButton(
title: 'Power',
color: MyColor.navigate,
icon: MyIcon.power,
context: context,
nextWidget: ({Lap lap}) => LapPowerWidget(lap: lap),
),
navigationButton(
title: 'Power Duration',
color: MyColor.navigate,
icon: MyIcon.powerDuration,
context: context,
nextWidget: ({Lap lap}) => LapPowerDurationWidget(lap: lap),
),
navigationButton(
title: 'Pace',
color: MyColor.navigate,
icon: MyIcon.speed,
context: context,
nextWidget: ({Lap lap}) => LapPaceWidget(lap: lap),
),
navigationButton(
title: 'Speed',
color: MyColor.navigate,
icon: MyIcon.speed,
context: context,
nextWidget: ({Lap lap}) => LapSpeedWidget(lap: lap),
),
navigationButton(
title: 'Ecor',
color: MyColor.navigate,
icon: MyIcon.power,
context: context,
nextWidget: ({Lap lap}) => LapEcorWidget(
lap: lap,
athlete: athlete,
if (lap.avgHeartRate != null)
navigationButton(
title: 'Heart Rate',
color: MyColor.navigate,
icon: MyIcon.heartRate,
context: context,
nextWidget: ({Lap lap}) => LapHeartRateWidget(lap: lap),
),
if (lap.avgPower != null)
navigationButton(
title: 'Power',
color: MyColor.navigate,
icon: MyIcon.power,
context: context,
nextWidget: ({Lap lap}) => LapPowerWidget(lap: lap),
),
if (lap.avgPower != null)
navigationButton(
title: 'Power Duration',
color: MyColor.navigate,
icon: MyIcon.powerDuration,
context: context,
nextWidget: ({Lap lap}) => LapPowerDurationWidget(lap: lap),
),
if (lap.avgSpeed != null)
navigationButton(
title: 'Pace',
color: MyColor.navigate,
icon: MyIcon.speed,
context: context,
nextWidget: ({Lap lap}) => LapPaceWidget(lap: lap),
),
if (lap.avgSpeed != null)
navigationButton(
title: 'Speed',
color: MyColor.navigate,
icon: MyIcon.speed,
context: context,
nextWidget: ({Lap lap}) => LapSpeedWidget(lap: lap),
),
if (lap.avgSpeed != null && lap.avgPower != null)
navigationButton(
title: 'Ecor',
color: MyColor.navigate,
icon: MyIcon.power,
context: context,
nextWidget: ({Lap lap}) => LapEcorWidget(
lap: lap,
athlete: athlete,
),
),
if (lap.avgGroundTime != null)
navigationButton(
title: 'Ground Time',
color: MyColor.navigate,
icon: MyIcon.groundTime,
context: context,
nextWidget: ({Lap lap}) => LapGroundTimeWidget(lap: lap),
),
if (lap.avgLegSpringStiffness != null)
navigationButton(
title: 'Leg Spring Stiffness',
color: MyColor.navigate,
icon: MyIcon.legSpringStiffness,
context: context,
nextWidget: ({Lap lap}) => LapLegSpringStiffnessWidget(lap: lap),
),
if (lap.avgFormPower != null)
navigationButton(
title: 'Form Power',
color: MyColor.navigate,
icon: MyIcon.formPower,
context: context,
nextWidget: ({Lap lap}) => LapFormPowerWidget(lap: lap),
),
if (lap.avgStrydCadence != null)
navigationButton(
title: 'Cadence',
color: MyColor.navigate,
icon: MyIcon.cadence,
context: context,
nextWidget: ({Lap lap}) => LapStrydCadenceWidget(lap: lap),
),
if (lap.avgVerticalOscillation != null)
navigationButton(
title: 'Vertical Oscillation',
color: MyColor.navigate,
icon: MyIcon.verticalOscillation,
context: context,
nextWidget: ({Lap lap}) => LapVerticalOscillationWidget(lap: lap),
),
),
navigationButton(
title: 'Ground Time',
color: MyColor.navigate,
icon: MyIcon.groundTime,
context: context,
nextWidget: ({Lap lap}) => LapGroundTimeWidget(lap: lap),
),
navigationButton(
title: 'Leg Spring Stiffness',
color: MyColor.navigate,
icon: MyIcon.legSpringStiffness,
context: context,
nextWidget: ({Lap lap}) => LapLegSpringStiffnessWidget(lap: lap),
),
navigationButton(
title: 'Form Power',
color: MyColor.navigate,
icon: MyIcon.formPower,
context: context,
nextWidget: ({Lap lap}) => LapFormPowerWidget(lap: lap),
),
navigationButton(
title: 'Cadence',
color: MyColor.navigate,
icon: MyIcon.cadence,
context: context,
nextWidget: ({Lap lap}) => LapStrydCadenceWidget(lap: lap),
),
navigationButton(
title: 'Vertical Oscillation',
color: MyColor.navigate,
icon: MyIcon.verticalOscillation,
context: context,
nextWidget: ({Lap lap}) => LapVerticalOscillationWidget(lap: lap),
),
navigationButton(
title: 'Altitude',
color: MyColor.navigate,
......@@ -168,7 +179,9 @@ class ShowLapScreen extends StatelessWidget {
crossAxisSpacing: 10,
padding: const EdgeInsets.all(10),
crossAxisCount:
MediaQuery.of(context).orientation == Orientation.portrait ? 2 : 4,
MediaQuery.of(context).orientation == Orientation.portrait
? 2
: 4,
children: tiles(context: context),
),
),
......
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