Commit 8d209279 authored by Administrator's avatar Administrator

wrap button text in flexible

parent 77bd7c14
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_secure_storage","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"path_provider","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.7/","dependencies":[]}],"android":[{"name":"flutter_secure_storage","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"path_provider","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.7/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+2/","dependencies":[]},{"name":"shared_preferences_macos","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+8/","dependencies":[]},{"name":"sqflite","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"url_launcher_macos","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.0.1+5/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"shared_preferences_web","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+5/","dependencies":[]},{"name":"url_launcher_web","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-0.1.1+5/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_secure_storage","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"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_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}],"date_created":"2020-05-27 10:45:45.725364","version":"1.17.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":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"path_provider","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.7/","dependencies":[]}],"android":[{"name":"flutter_secure_storage","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-3.3.3/","dependencies":[]},{"name":"path_provider","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.8/","dependencies":[]},{"name":"shared_preferences","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.7+2/","dependencies":[]},{"name":"sqflite","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"uni_links","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/uni_links-0.4.0/","dependencies":[]},{"name":"url_launcher","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.7/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4+2/","dependencies":[]},{"name":"shared_preferences_macos","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+8/","dependencies":[]},{"name":"sqflite","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0+1/","dependencies":[]},{"name":"url_launcher_macos","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.0.1+5/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"shared_preferences_web","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+5/","dependencies":[]},{"name":"url_launcher_web","path":"/home/stefan/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-0.1.1+5/","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_secure_storage","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"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_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}],"date_created":"2020-05-28 15:29:55.382615","version":"1.17.1"}
\ No newline at end of file
......@@ -102,7 +102,7 @@ class _ShowActivityScreenState extends State<ShowActivityScreen> {
),
),
navigationButton(
title: 'Power\nDuration',
title: 'Power Duration',
color: MyColor.navigate,
icon: MyIcon.powerDuration,
context: context,
......@@ -112,7 +112,7 @@ class _ShowActivityScreenState extends State<ShowActivityScreen> {
),
),
navigationButton(
title: 'Power /\nHeart Rate',
title: 'Power / Heart Rate',
color: MyColor.navigate,
icon: MyIcon.power,
context: context,
......@@ -132,7 +132,7 @@ class _ShowActivityScreenState extends State<ShowActivityScreen> {
),
),
navigationButton(
title: 'Speed /\nHeart Rate',
title: 'Speed / Heart Rate',
color: MyColor.navigate,
icon: MyIcon.speed,
context: context,
......@@ -172,7 +172,7 @@ class _ShowActivityScreenState extends State<ShowActivityScreen> {
),
),
navigationButton(
title: 'Vertical\nOscillation',
title: 'Vertical Oscillation',
color: MyColor.navigate,
icon: MyIcon.verticalOscillation,
context: context,
......@@ -202,7 +202,7 @@ class _ShowActivityScreenState extends State<ShowActivityScreen> {
),
),
navigationButton(
title: 'Leg Spring\nStiffness',
title: 'Leg Spring Stiffness',
color: MyColor.navigate,
icon: MyIcon.legSpringStiffness,
context: context,
......@@ -235,7 +235,9 @@ class _ShowActivityScreenState extends State<ShowActivityScreen> {
color: MyColor.add,
icon: MyIcon.settings,
textColor: MyColor.textColor(backgroundColor: MyColor.add),
label: const Text('Rerun\n Autotagging'),
label: const Flexible(
child: Text('Rerun Autotagging'),
),
onPressed: () => autoTagger(),
),
],
......@@ -255,7 +257,9 @@ class _ShowActivityScreenState extends State<ShowActivityScreen> {
color: color,
textColor: MyColor.textColor(backgroundColor: color),
icon: icon,
label: Text(title),
label: Flexible(
child: Text(title),
),
onPressed: () => Navigator.push(
context,
MaterialPageRoute<BuildContext>(
......
......@@ -68,7 +68,8 @@ class _ShowAthleteScreenState extends State<ShowAthleteScreen> {
),
),
body: StaggeredGridView.count(
staggeredTiles: List<StaggeredTile>.filled(17, const StaggeredTile.fit(1)),
staggeredTiles:
List<StaggeredTile>.filled(17, const StaggeredTile.fit(1)),
crossAxisSpacing: 10,
padding: const EdgeInsets.all(10),
crossAxisCount:
......@@ -95,7 +96,7 @@ class _ShowAthleteScreenState extends State<ShowAthleteScreen> {
),
navigationButton(
color: MyColor.navigate,
title: 'Power /\nHeart Rate',
title: 'Power / Heart Rate',
icon: MyIcon.power,
nextWidget: AthletePowerPerHeartRateWidget(athlete: widget.athlete),
),
......@@ -113,7 +114,7 @@ class _ShowAthleteScreenState extends State<ShowAthleteScreen> {
),
navigationButton(
color: MyColor.navigate,
title: 'Speed /\nHeart Rate',
title: 'Speed / Heart Rate',
icon: MyIcon.speed,
nextWidget: AthleteSpeedPerHeartRateWidget(athlete: widget.athlete),
),
......@@ -121,7 +122,9 @@ class _ShowAthleteScreenState extends State<ShowAthleteScreen> {
color: MyColor.add,
textColor: MyColor.textColor(backgroundColor: MyColor.add),
icon: MyIcon.downloadLocal,
label: const Text('Import .fit\nfrom Folder'),
label: const Flexible(
child: Text('Import .fit from Folder'),
),
onPressed: () => importLocal(),
),
navigationButton(
......@@ -132,13 +135,13 @@ class _ShowAthleteScreenState extends State<ShowAthleteScreen> {
),
navigationButton(
color: MyColor.settings,
title: 'Power Zone\nSchemas',
title: 'Power Zone Schemas',
icon: MyIcon.power,
nextWidget: AthletePowerZoneSchemaWidget(athlete: widget.athlete),
),
navigationButton(
color: MyColor.settings,
title: 'Heart Rate\nZone Schemas',
title: 'Heart Rate Zone Schemas',
icon: MyIcon.heartRate,
nextWidget:
AthleteHeartRateZoneSchemaWidget(athlete: widget.athlete),
......@@ -159,27 +162,35 @@ class _ShowAthleteScreenState extends State<ShowAthleteScreen> {
color: MyColor.danger,
textColor: MyColor.textColor(backgroundColor: MyColor.danger),
icon: MyIcon.delete,
label: const Text('Delete\nAthlete'),
label: const Flexible(
child: Text('Delete Athlete'),
),
onPressed: () => deleteUser(),
),
RaisedButton.icon(
color: MyColor.settings,
icon: MyIcon.settings,
textColor: MyColor.textColor(backgroundColor: MyColor.add),
label: const Text('Recalculate\nAverages'),
label: const Flexible(
child: Text('Recalculate Averages'),
),
onPressed: () => recalculate(),
),
RaisedButton.icon(
color: MyColor.settings,
textColor: MyColor.textColor(backgroundColor: MyColor.settings),
icon: MyIcon.settings,
label: const Text('Redo\nAutotagging'),
label: const Flexible(
child: Text('Redo Autotagging'),
),
onPressed: () => redoAutoTagging(),
),
RaisedButton.icon(
color: MyColor.primary,
icon: MyIcon.download,
label: const Text('Download\nDemo Data'),
label: const Flexible(
child: Text('Download Demo Data'),
),
onPressed: () => downloadDemoData(),
),
],
......@@ -198,7 +209,7 @@ class _ShowAthleteScreenState extends State<ShowAthleteScreen> {
color: color ?? MyColor.primary,
textColor: MyColor.textColor(backgroundColor: color),
icon: icon,
label: Text(title),
label: Flexible(child: Text(title)),
onPressed: () => Navigator.push(
context,
MaterialPageRoute<BuildContext>(
......@@ -349,8 +360,8 @@ class _ShowAthleteScreenState extends State<ShowAthleteScreen> {
await download(activity: activity);
}
final Iterable<Activity> downloadedActivities =
activities.where((Activity activity) => activity.db.state == 'downloaded');
final Iterable<Activity> downloadedActivities = activities
.where((Activity activity) => activity.db.state == 'downloaded');
for (final Activity activity in downloadedActivities) {
await parse(activity: activity);
await activity.autoTagger(athlete: widget.athlete);
......@@ -418,7 +429,8 @@ class _ShowAthleteScreenState extends State<ShowAthleteScreen> {
titleText: const LinearProgressIndicator(value: 0),
)..show(context);
final Stream<int> percentageStream = activity.parse(athlete: widget.athlete);
final Stream<int> percentageStream =
activity.parse(athlete: widget.athlete);
await for (final int value in percentageStream) {
flushbar.dismiss();
flushbar = Flushbar<Object>(
......
......@@ -41,7 +41,8 @@ class ShowLapScreen extends StatelessWidget {
),
),
body: StaggeredGridView.count(
staggeredTiles: List<StaggeredTile>.filled(12, const StaggeredTile.fit(1)),
staggeredTiles:
List<StaggeredTile>.filled(12, const StaggeredTile.fit(1)),
crossAxisSpacing: 10,
padding: const EdgeInsets.all(10),
crossAxisCount:
......@@ -69,7 +70,7 @@ class ShowLapScreen extends StatelessWidget {
nextWidget: ({Lap lap}) => LapPowerWidget(lap: lap),
),
navigationButton(
title: 'Power\nDuration',
title: 'Power Duration',
color: MyColor.navigate,
icon: MyIcon.powerDuration,
context: context,
......@@ -93,7 +94,7 @@ class ShowLapScreen extends StatelessWidget {
nextWidget: ({Lap lap}) => LapGroundTimeWidget(lap: lap),
),
navigationButton(
title: 'Leg Spring\nStiffness',
title: 'Leg Spring Stiffness',
color: MyColor.navigate,
icon: MyIcon.legSpringStiffness,
context: context,
......@@ -114,7 +115,7 @@ class ShowLapScreen extends StatelessWidget {
nextWidget: ({Lap lap}) => LapStrydCadenceWidget(lap: lap),
),
navigationButton(
title: 'Vertical\nOscillation',
title: 'Vertical Oscillation',
color: MyColor.navigate,
icon: MyIcon.verticalOscillation,
context: context,
......@@ -153,7 +154,9 @@ class ShowLapScreen extends StatelessWidget {
color: color ?? MyColor.primary,
textColor: MyColor.textColor(backgroundColor: color),
icon: icon,
label: Text(title),
label: Flexible(
child: Text(title),
),
onPressed: () => Navigator.push(
context,
MaterialPageRoute<BuildContext>(
......
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