WT 1.1.13+2 double values fix
This commit is contained in:
@@ -40,7 +40,7 @@ class CustomerBirthYearChange extends CustomerChangeEvent {
|
||||
}
|
||||
|
||||
class CustomerWeightChange extends CustomerChangeEvent {
|
||||
final int weight;
|
||||
final double weight;
|
||||
const CustomerWeightChange({required this.weight});
|
||||
|
||||
@override
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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),
|
||||
],
|
||||
)),
|
||||
|
||||
Reference in New Issue
Block a user