WT 1.1.24+5 training plan fixes

This commit is contained in:
bossanyit
2021-11-05 18:40:58 +01:00
parent e8fc6cd7ec
commit 4c5aff91db
23 changed files with 263 additions and 126 deletions
+1 -1
View File
@@ -166,7 +166,7 @@ class _CustomerHeightPageState extends State<CustomerHeightPage> with Trans {
width: 55,
color: Color(0xffb4f500),
value: changeBloc.height,
onValueChanged: (value) => {
onChanged: (value) => {
changeBloc.add(CustomerHeightChange(height: value.toInt())),
},
),
+2 -2
View File
@@ -251,7 +251,7 @@ class CustomerModifyPage extends StatelessWidget with Trans {
color: Colors.blue,
height: 55,
width: 25,
onValueChanged: (value) => {
onChanged: (value) => {
customerBloc.add(CustomerBirthYearChange(year: value.toInt())),
},
),
@@ -353,7 +353,7 @@ class CustomerModifyPage extends StatelessWidget with Trans {
width: 55,
color: Colors.blue,
value: customerBloc.height,
onValueChanged: (value) => {
onChanged: (value) => {
customerBloc.add(CustomerHeightChange(height: value.toInt())),
},
),
+4
View File
@@ -145,6 +145,10 @@ class TrainingEvaluationPage extends StatelessWidget with Trans {
Divider(color: Colors.transparent),
summaryRow("asset/image/pict_hypertrophy.png", "Maximum Repeats", "${bloc.maxRepeats}" + " " + t("reps")),
Divider(color: Colors.transparent),
summaryRow("asset/image/pict_1rm.png", "Maximum Lift", "${bloc.maxTotalLift}" + " " + t("kg")),
Divider(color: Colors.transparent),
summaryRow("asset/image/pict_reps_volumen_db.png", "Total Repeats", "${bloc.totalRepeats}" + " " + t("reps")),
Divider(color: Colors.transparent),
//summaryRow("asset/image/pict_reps_volumen_db.png", "Total Lift Ever", "100 kg"),
//Divider(color: Colors.transparent),
Text(t("Details"),
+4 -1
View File
@@ -33,7 +33,9 @@ class _TrainingPlanExecuteState extends State<TrainingPlanExecute> with Trans {
setContext(context);
return Scaffold(
appBar: AppBarNav(depth: 0),
appBar: AppBarNav(
depth: 0,
),
body: Container(
padding: EdgeInsets.all(0),
decoration: BoxDecoration(
@@ -335,6 +337,7 @@ class _ExerciseListState extends State<ExerciseList> with Trans {
final HashMap args = HashMap();
args['exerciseType'] = next.exerciseType;
args['customerTrainingPlanDetails'] = detail;
bloc.backupDetail(detail);
Navigator.of(context).pushNamed('myTrainingPlanExercise', arguments: args);
return;
}
+16 -2
View File
@@ -24,7 +24,14 @@ class TrainingPlanExercise extends StatelessWidget with Trans {
setContext(context);
return Scaffold(
appBar: AppBarNav(depth: 1),
appBar: AppBarNav(
depth: 1,
onTap: () => {
print("back"),
bloc.add(
TrainingPlanChangeCancel(detail: detail),
)
}),
body: Container(
height: double.infinity,
width: double.infinity,
@@ -72,7 +79,14 @@ class TrainingPlanExercise extends StatelessWidget with Trans {
heroTag: "saveButton",
onPressed: () => {
Navigator.of(context).pop(),
bloc.add(TrainingPlanSaveExercise(detail: detail)),
if (detail.weight != -3)
{
bloc.add(TrainingPlanSaveExercise(detail: detail)),
}
else
{
bloc.add(TrainingPlanFinishDropset(detail: detail)),
}
},
backgroundColor: Colors.orange[800],
icon: Icon(CustomIcon.save),