WT 1.1.13+2 double values fix

This commit is contained in:
bossanyit
2021-04-19 16:49:05 +02:00
parent cc1117d8a1
commit 5fe8f76f48
16 changed files with 19 additions and 9 deletions
@@ -40,7 +40,7 @@ class CustomerBirthYearChange extends CustomerChangeEvent {
}
class CustomerWeightChange extends CustomerChangeEvent {
final int weight;
final double weight;
const CustomerWeightChange({required this.weight});
@override
+1 -1
View File
@@ -102,7 +102,7 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> with Logg
yield ExerciseNewReady();
} else if (event is ExerciseNewWeightChange) {
yield ExerciseNewLoading();
customerRepository.setWeight(event.value.toInt());
customerRepository.setWeight(event.value);
changedWeight = true;
weight = event.value;
getBMI();
+2 -2
View File
@@ -125,9 +125,9 @@ class CustomerRepository with Logging {
this.customer!.sex = sex;
}
setWeight(int weight) {
setWeight(double weight) {
final propertyName = "Weight";
this.setCustomerProperty(propertyName, weight.toDouble());
this.setCustomerProperty(propertyName, weight);
}
setHeight(int height) {
+1 -1
View File
@@ -260,7 +260,7 @@ class CustomerModifyPage extends StatelessWidget with Trans {
initalValue: customerBloc.weight.toInt(),
unit: " ",
color: Colors.indigo,
onChange: (value) => {customerBloc.add(CustomerWeightChange(weight: value.toInt()))}),
onChange: (value) => {customerBloc.add(CustomerWeightChange(weight: value))}),
SizedBox(width: 30),
],
)),