WT1.1.17 +4 pointer fix
This commit is contained in:
+54
-28
@@ -209,29 +209,6 @@ class _BMIState extends State<BMI> with Trans {
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
/* Stack(alignment: Alignment.center, children: [
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 30, right: 30),
|
||||
child: Image.asset(
|
||||
"asset/image/BMI_graph_C.png",
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: widget.exerciseBloc.bmiTop,
|
||||
left: widget.exerciseBloc.bmiLeft,
|
||||
child:
|
||||
Container() RotationAnimatedWidget.tween(
|
||||
enabled: true,
|
||||
duration: const Duration(milliseconds: 1000),
|
||||
rotationDisabled: Rotation.deg(),
|
||||
rotationEnabled: Rotation.deg(z: widget.exerciseBloc.bmiAngle),
|
||||
child: Image.asset(
|
||||
"asset/image/BMI_mutato.png",
|
||||
width: 65,
|
||||
))
|
||||
)
|
||||
]), */
|
||||
Divider(color: Colors.transparent),
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 65, right: 65),
|
||||
@@ -335,8 +312,11 @@ class _BMIState extends State<BMI> with Trans {
|
||||
keyboardType: TextInputType.numberWithOptions(decimal: false),
|
||||
textInputAction: TextInputAction.done,
|
||||
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]),
|
||||
onChanged: (value) =>
|
||||
{value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value)))}),
|
||||
onChanged: (value) => {
|
||||
value = value.replaceFirst(",", "."),
|
||||
value = value.replaceAll(RegExp(r'[^0-9.]'), ""),
|
||||
widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value))),
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
return Container();
|
||||
@@ -355,7 +335,50 @@ class _BMIState extends State<BMI> with Trans {
|
||||
width: 10,
|
||||
),
|
||||
Flexible(
|
||||
child: TextFormField(
|
||||
child:
|
||||
/* SfLinearGauge(
|
||||
minimum: widget.exerciseBloc.weight > 0 ? (widget.exerciseBloc.weight - 10).floor().toDouble() : 40,
|
||||
maximum: widget.exerciseBloc.weight > 0 ? (widget.exerciseBloc.weight + 10).ceil().toDouble() : 150,
|
||||
labelPosition: LinearLabelPosition.outside,
|
||||
tickPosition: LinearElementPosition.outside,
|
||||
markerPointers: [
|
||||
LinearWidgetPointer(
|
||||
value: widget.exerciseBloc.weight,
|
||||
offset: 5,
|
||||
position: LinearElementPosition.outside,
|
||||
markerAlignment: LinearMarkerAlignment.center,
|
||||
child: Container(
|
||||
height: 14,
|
||||
width: 44,
|
||||
color: Colors.transparent,
|
||||
child: Text(widget.exerciseBloc.weight.toStringAsFixed(1),
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
),
|
||||
LinearShapePointer(
|
||||
position: LinearElementPosition.inside,
|
||||
shapeType: LinearShapePointerType.triangle,
|
||||
value: widget.exerciseBloc.weight,
|
||||
height: 45,
|
||||
width: 20,
|
||||
color: Colors.yellow[200],
|
||||
onValueChanged: (value) => {widget.exerciseBloc.add(ExerciseNewWeightChange(value: value))},
|
||||
),
|
||||
],
|
||||
orientation: LinearGaugeOrientation.horizontal,
|
||||
majorTickStyle: LinearTickStyle(length: 20, color: Colors.yellow[50]),
|
||||
axisLabelStyle: TextStyle(fontSize: 12.0, color: Colors.yellow[50]),
|
||||
axisTrackStyle: LinearAxisTrackStyle(
|
||||
color: Colors.cyan,
|
||||
edgeStyle: LinearEdgeStyle.bothFlat,
|
||||
thickness: 1.0,
|
||||
borderColor: Colors
|
||||
.grey)), */
|
||||
TextFormField(
|
||||
focusNode: _nodeText1,
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.only(left: 15, top: 5, bottom: 5),
|
||||
@@ -373,8 +396,11 @@ class _BMIState extends State<BMI> with Trans {
|
||||
keyboardType: TextInputType.numberWithOptions(decimal: true),
|
||||
textInputAction: TextInputAction.done,
|
||||
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]),
|
||||
onChanged: (value) =>
|
||||
{value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value)))},
|
||||
onChanged: (value) => {
|
||||
value = value.replaceFirst(",", "."),
|
||||
value = value.replaceAll(RegExp(r'[^0-9.]'), ""),
|
||||
widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value))),
|
||||
},
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
|
||||
@@ -216,8 +216,11 @@ class _BMRState extends State<BMR> with Trans {
|
||||
keyboardType: TextInputType.numberWithOptions(decimal: false),
|
||||
textInputAction: TextInputAction.done,
|
||||
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]),
|
||||
onChanged: (value) =>
|
||||
{value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value)))}),
|
||||
onChanged: (value) => {
|
||||
value = value.replaceFirst(",", "."),
|
||||
value = value.replaceAll(RegExp(r'[^0-9.]'), ""),
|
||||
widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value))),
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
return Container();
|
||||
@@ -244,7 +247,10 @@ class _BMRState extends State<BMR> with Trans {
|
||||
keyboardType: TextInputType.numberWithOptions(decimal: false),
|
||||
textInputAction: TextInputAction.done,
|
||||
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]),
|
||||
onChanged: (value) => {widget.exerciseBloc.add(ExerciseNewBirthyearChange(value: int.parse(value)))}),
|
||||
onChanged: (value) => {
|
||||
value = value.replaceAll(RegExp(r'[^0-9.]'), ""),
|
||||
widget.exerciseBloc.add(ExerciseNewBirthyearChange(value: int.parse(value)))
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -366,8 +372,11 @@ class _BMRState extends State<BMR> with Trans {
|
||||
keyboardType: TextInputType.numberWithOptions(decimal: true),
|
||||
textInputAction: TextInputAction.done,
|
||||
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]),
|
||||
onChanged: (value) =>
|
||||
{value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value)))},
|
||||
onChanged: (value) => {
|
||||
value = value.replaceFirst(",", "."),
|
||||
value = value.replaceAll(RegExp(r'[^0-9.]'), ""),
|
||||
widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value))),
|
||||
},
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
|
||||
@@ -257,6 +257,7 @@ class _ExerciseSaveState extends State<ExerciseSave> with Trans {
|
||||
style: GoogleFonts.archivoBlack(fontSize: 80, color: Colors.yellow[300]),
|
||||
onChanged: (value) => {
|
||||
value = value.replaceFirst(",", "."),
|
||||
value = value.replaceAll(RegExp(r'[^0-9.]'), ""),
|
||||
widget.onUnitQuantityChanged!(value),
|
||||
}),
|
||||
]));
|
||||
|
||||
@@ -156,7 +156,11 @@ class _InputDialogState<Event> extends State<InputDialog<Event>> with Trans {
|
||||
keyboardType: TextInputType.numberWithOptions(decimal: true),
|
||||
textInputAction: TextInputAction.done,
|
||||
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]),
|
||||
onChanged: (value) => {value = value.replaceFirst(",", "."), this.inputValue = double.parse(value)},
|
||||
onChanged: (value) => {
|
||||
value = value.replaceFirst(",", "."),
|
||||
value = value.replaceAll(RegExp(r'[^0-9.]'), ""),
|
||||
this.inputValue = double.parse(value),
|
||||
},
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
|
||||
Reference in New Issue
Block a user