WT 1.1.13 Test Central bug fixes
This commit is contained in:
@@ -3,7 +3,7 @@ import 'package:aitrainer_app/util/common.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:liquid_progress_indicator/liquid_progress_indicator.dart';
|
||||
import 'package:aitrainer_app/library/liquid_progress_indicator/liquid_linear_progress_indicator.dart';
|
||||
|
||||
class AppBarProgress extends StatefulWidget implements PreferredSizeWidget {
|
||||
final int max;
|
||||
|
||||
@@ -258,10 +258,11 @@ class _BMIState extends State<BMI> with Trans {
|
||||
),
|
||||
),
|
||||
initialValue: widget.exerciseBloc.height.toStringAsFixed(0),
|
||||
keyboardType: TextInputType.numberWithOptions(decimal: true),
|
||||
keyboardType: TextInputType.numberWithOptions(decimal: false),
|
||||
textInputAction: TextInputAction.done,
|
||||
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]),
|
||||
onChanged: (value) => {widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value)))}),
|
||||
onChanged: (value) =>
|
||||
{value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value)))}),
|
||||
);
|
||||
} else {
|
||||
return Container();
|
||||
@@ -294,11 +295,12 @@ class _BMIState extends State<BMI> with Trans {
|
||||
borderSide: BorderSide(color: Colors.white12, width: 0.4),
|
||||
),
|
||||
),
|
||||
initialValue: widget.exerciseBloc.weight.toStringAsFixed(0),
|
||||
initialValue: widget.exerciseBloc.weight.toStringAsFixed(1),
|
||||
keyboardType: TextInputType.numberWithOptions(decimal: true),
|
||||
textInputAction: TextInputAction.done,
|
||||
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]),
|
||||
onChanged: (value) => {widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value)))},
|
||||
onChanged: (value) =>
|
||||
{value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value)))},
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'package:aitrainer_app/bloc/exercise_new/exercise_new_bloc.dart';
|
||||
import 'package:aitrainer_app/util/app_localization.dart';
|
||||
import 'package:aitrainer_app/model/fitness_state.dart';
|
||||
import 'package:aitrainer_app/util/trans.dart';
|
||||
import 'package:aitrainer_app/library/dropdown_search.dart';
|
||||
import 'package:aitrainer_app/library/dropdown_search/dropdown_search.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
@@ -213,10 +213,11 @@ class _BMRState extends State<BMR> with Trans {
|
||||
),
|
||||
),
|
||||
initialValue: widget.exerciseBloc.height.toStringAsFixed(0),
|
||||
keyboardType: TextInputType.numberWithOptions(decimal: true),
|
||||
keyboardType: TextInputType.numberWithOptions(decimal: false),
|
||||
textInputAction: TextInputAction.done,
|
||||
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]),
|
||||
onChanged: (value) => {widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value)))}),
|
||||
onChanged: (value) =>
|
||||
{value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value)))}),
|
||||
);
|
||||
} else {
|
||||
return Container();
|
||||
@@ -361,11 +362,12 @@ class _BMRState extends State<BMR> with Trans {
|
||||
borderSide: BorderSide(color: Colors.white12, width: 0.4),
|
||||
),
|
||||
),
|
||||
initialValue: widget.exerciseBloc.weight.toStringAsFixed(0),
|
||||
initialValue: widget.exerciseBloc.weight.toStringAsFixed(1),
|
||||
keyboardType: TextInputType.numberWithOptions(decimal: true),
|
||||
textInputAction: TextInputAction.done,
|
||||
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]),
|
||||
onChanged: (value) => {widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value)))},
|
||||
onChanged: (value) =>
|
||||
{value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value)))},
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
|
||||
@@ -107,6 +107,7 @@ class _BottomBarMultipleExercisesState extends State<BottomBarMultipleExercises>
|
||||
}
|
||||
|
||||
List<Widget> getChildren(TestSetExecuteBloc bloc) {
|
||||
print("Isset? ${widget.isSet}");
|
||||
final List<Widget> list = [];
|
||||
if (!widget.isSet! && !bloc.hasBegun()) {
|
||||
list.add(GestureDetector(
|
||||
@@ -174,7 +175,7 @@ class _BottomBarMultipleExercisesState extends State<BottomBarMultipleExercises>
|
||||
color: Colors.transparent,
|
||||
),
|
||||
Text(
|
||||
ret['message2'],
|
||||
t(ret['message2']),
|
||||
style: GoogleFonts.inter(color: Colors.grey[800]),
|
||||
),
|
||||
]))),
|
||||
|
||||
@@ -227,27 +227,6 @@ class _ExerciseSaveState extends State<ExerciseSave> with Trans {
|
||||
Divider(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
/* TextButton(
|
||||
onPressed: () {
|
||||
widget.onSubmit();
|
||||
/* showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return Victory(
|
||||
victory: true,
|
||||
);
|
||||
}); */
|
||||
},
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Image.asset('asset/icon/gomb_orange_c.png', width: 140, height: 60),
|
||||
Text(
|
||||
t("Save"),
|
||||
style: TextStyle(fontSize: 16, color: Colors.white),
|
||||
),
|
||||
],
|
||||
)), */
|
||||
]),
|
||||
)));
|
||||
}
|
||||
@@ -276,7 +255,10 @@ class _ExerciseSaveState extends State<ExerciseSave> with Trans {
|
||||
keyboardType: TextInputType.numberWithOptions(decimal: true),
|
||||
textInputAction: TextInputAction.done,
|
||||
style: GoogleFonts.archivoBlack(fontSize: 80, color: Colors.yellow[300]),
|
||||
onChanged: (value) => widget.onUnitQuantityChanged!(value)),
|
||||
onChanged: (value) => {
|
||||
value = value.replaceFirst(",", "."),
|
||||
widget.onUnitQuantityChanged!(value),
|
||||
}),
|
||||
]));
|
||||
}
|
||||
return row;
|
||||
|
||||
@@ -152,11 +152,11 @@ class _InputDialogState<Event> extends State<InputDialog<Event>> with Trans {
|
||||
borderSide: BorderSide(color: Colors.white12, width: 0.4),
|
||||
),
|
||||
),
|
||||
initialValue: widget.initialValue.toStringAsFixed(0),
|
||||
initialValue: widget.initialValue.toStringAsFixed(1),
|
||||
keyboardType: TextInputType.numberWithOptions(decimal: true),
|
||||
textInputAction: TextInputAction.done,
|
||||
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]),
|
||||
onChanged: (value) => this.inputValue = double.parse(value),
|
||||
onChanged: (value) => {value = value.replaceFirst(",", "."), this.inputValue = double.parse(value)},
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
|
||||
@@ -279,9 +279,13 @@ class _MenuPageWidgetState extends State<MenuPageWidget> with Trans, Logging {
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor: Colors.transparent,
|
||||
title: Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
|
||||
SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
!activeExercisePlan
|
||||
? SizedBox(
|
||||
width: 50,
|
||||
)
|
||||
: SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () => {
|
||||
showDialog(
|
||||
@@ -318,18 +322,22 @@ class _MenuPageWidgetState extends State<MenuPageWidget> with Trans, Logging {
|
||||
}
|
||||
},
|
||||
),
|
||||
activeExercisePlan
|
||||
Cache().activeExercisePlan != null
|
||||
? GestureDetector(
|
||||
onTap: () => showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return DialogCommon(
|
||||
title: t("You have an active Test Set!"),
|
||||
descriptions: t("Press OK to continue"),
|
||||
descriptions: Cache().activeExercisePlan!.name,
|
||||
description2: t("Press OK to continue"),
|
||||
text: "OK",
|
||||
onTap: () => {
|
||||
Navigator.of(context).pop(),
|
||||
Navigator.of(context).pushNamed("testSetExecute"),
|
||||
if (Cache().activeExercisePlan != null)
|
||||
{
|
||||
Navigator.of(context).pushNamed("testSetExecute"),
|
||||
}
|
||||
},
|
||||
onCancel: () => {
|
||||
Navigator.of(context).pop(),
|
||||
@@ -348,6 +356,11 @@ class _MenuPageWidgetState extends State<MenuPageWidget> with Trans, Logging {
|
||||
);
|
||||
}))
|
||||
: Offstage(),
|
||||
activeExercisePlan
|
||||
? SizedBox(
|
||||
width: 10,
|
||||
)
|
||||
: Offstage(),
|
||||
]));
|
||||
return sliverAppBar;
|
||||
}
|
||||
|
||||
@@ -2,8 +2,7 @@ import 'dart:async';
|
||||
|
||||
import 'package:aitrainer_app/model/workout_menu_tree.dart';
|
||||
import 'package:aitrainer_app/util/trans.dart';
|
||||
import 'package:aitrainer_app/library/dropdown_search.dart';
|
||||
//import 'package:aitrainer_app/library/dropdown_search.dart';
|
||||
import 'package:aitrainer_app/library/dropdown_search/dropdown_search.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
|
||||
@@ -83,7 +83,12 @@ class _SizeState extends State<SizeWidget> with Trans {
|
||||
.toDouble() -
|
||||
45,
|
||||
child: GestureDetector(
|
||||
onTap: () => onPressed(widget.exerciseBloc.customerRepository.getPropertyByName("Weight")!),
|
||||
onTap: () => {
|
||||
if (widget.exerciseBloc.customerRepository.getPropertyByName("Weight") != null)
|
||||
{
|
||||
onPressed(widget.exerciseBloc.customerRepository.getPropertyByName("Weight")!),
|
||||
}
|
||||
},
|
||||
child: Image.asset(
|
||||
"asset/image/merleg.png",
|
||||
height: 120,
|
||||
@@ -181,7 +186,6 @@ class _SizeState extends State<SizeWidget> with Trans {
|
||||
}
|
||||
|
||||
void onPressed(Property element) {
|
||||
print(element.propertyName);
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => InputDialog(
|
||||
|
||||
Reference in New Issue
Block a user