-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from a-mabe/full-workout
Implement full workout
- Loading branch information
Showing
37 changed files
with
1,052 additions
and
558 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.2.6 | ||
1.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
const String workTitle = "Work"; | ||
const String restTitle = "Rest"; | ||
const String additionalConfigTitle = "Additional configuration"; | ||
const String getReadyTitle = "Get ready"; | ||
const String warmUpTitle = "Warm-up"; | ||
const String coolDownTitle = "Cool down"; | ||
const String repeatTitle = "Restart"; | ||
const String breakTitle = "Break"; | ||
|
||
const String workMinutesKey = "work-minutes"; | ||
const String workSecondsKey = "work-seconds"; | ||
|
||
const String restMinutesKey = "rest-minutes"; | ||
const String restSecondsKey = "rest-seconds"; | ||
|
||
const String warmupMinutesKey = "warmup-minutes"; | ||
const String warmupSecondsKey = "warmup-seconds"; | ||
|
||
const String cooldownMinutesKey = "cooldown-minutes"; | ||
const String cooldownSecondsKey = "cooldown-seconds"; | ||
|
||
const String iterationsKey = "iterations"; | ||
|
||
const String breakMinutesKey = "break-minutes"; | ||
const String breakSecondsKey = "break-seconds"; | ||
|
||
const String getReadyMinutesKey = "get-ready-minutes"; | ||
const String getReadySecondsKey = "get-ready-seconds"; | ||
|
||
const List timeMinutesKeys = [ | ||
workMinutesKey, | ||
restMinutesKey, | ||
]; | ||
|
||
const List timeSecondsKeys = [ | ||
workSecondsKey, | ||
restSecondsKey, | ||
]; | ||
|
||
const List additionalMinutesKeys = [ | ||
getReadyMinutesKey, | ||
warmupMinutesKey, | ||
cooldownMinutesKey, | ||
breakMinutesKey | ||
]; | ||
|
||
const List additionalSecondsKeys = [ | ||
getReadySecondsKey, | ||
warmupSecondsKey, | ||
cooldownSecondsKey, | ||
breakSecondsKey | ||
]; | ||
|
||
const List<String> timeTitles = [workTitle, restTitle, additionalConfigTitle]; | ||
|
||
const List<String> additionalTimeTitles = [ | ||
getReadyTitle, | ||
warmUpTitle, | ||
coolDownTitle, | ||
repeatTitle, | ||
breakTitle | ||
]; | ||
|
||
const List<String> timeSubTitles = [ | ||
"Required", | ||
"Required", | ||
"Warmup, auto restart, and more" | ||
]; | ||
|
||
const List<String> additionalTimeSubTitles = [ | ||
"Optional, default 10s", | ||
"Optional", | ||
"Optional", | ||
"Auto restart", | ||
"Optional, between restarts" | ||
]; | ||
|
||
const List<Widget> timeLeadingIcons = [ | ||
Icon(Icons.fitness_center), | ||
Icon(Icons.pause), | ||
Icon(Icons.tune) | ||
]; | ||
|
||
const List<Widget> additionalTimeLeadingIcons = [ | ||
Icon(Icons.flag), | ||
Icon(Icons.emoji_people), | ||
Icon(Icons.ac_unit), | ||
Icon(Icons.replay), | ||
Icon(Icons.snooze) | ||
]; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
74 changes: 74 additions & 0 deletions
74
lib/create_workout/form_picker_widgets/expansion_additional_config_tile.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:openhiit/create_workout/constants/set_timings_constants.dart'; | ||
|
||
class ExpansionRepeatTileClass extends StatefulWidget { | ||
/// Vars | ||
final Widget? trailingWidget; | ||
|
||
const ExpansionRepeatTileClass({ | ||
this.trailingWidget, | ||
super.key, | ||
}); | ||
|
||
@override | ||
ExpansionRepeatTileClassState createState() => | ||
ExpansionRepeatTileClassState(); | ||
} | ||
|
||
class ExpansionRepeatTileClassState extends State<ExpansionRepeatTileClass> { | ||
@override | ||
void initState() { | ||
super.initState(); | ||
} | ||
|
||
@override | ||
void dispose() { | ||
super.dispose(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ExpansionTile( | ||
title: Text('Additional configuration'), | ||
subtitle: Text('Auto restart, warm-up, and more'), | ||
leading: Icon(Icons.tune), | ||
children: <Widget>[ | ||
ListTile( | ||
title: Text(additionalTimeTitles[0]), | ||
subtitle: Text(additionalTimeSubTitles[0]), | ||
leading: Icon(Icons.flag), | ||
trailing: widget.trailingWidget, | ||
), | ||
ListTile( | ||
title: Text(additionalTimeTitles[1]), | ||
subtitle: Text(additionalTimeSubTitles[1]), | ||
leading: Icon(Icons.emoji_people), | ||
trailing: widget.trailingWidget, | ||
), | ||
ListTile( | ||
title: Text(additionalTimeTitles[2]), | ||
subtitle: Text(additionalTimeSubTitles[2]), | ||
leading: Icon(Icons.ac_unit), | ||
trailing: widget.trailingWidget, | ||
), | ||
ListTile( | ||
title: Text(additionalTimeTitles[3]), | ||
subtitle: Text(additionalTimeSubTitles[3]), | ||
), | ||
ListTile( | ||
title: Text(additionalTimeTitles[4]), | ||
subtitle: Text(additionalTimeSubTitles[4]), | ||
leading: Icon(Icons.replay), | ||
trailing: widget.trailingWidget, | ||
), | ||
ListTile( | ||
title: Text(additionalTimeTitles[5]), | ||
subtitle: Text(additionalTimeSubTitles[5]), | ||
leading: Icon(Icons.block), | ||
trailing: widget.trailingWidget, | ||
), | ||
], | ||
); | ||
} | ||
} |
Oops, something went wrong.