v1.27.1 error fixes

This commit is contained in:
bossanyit
2023-01-15 11:45:30 +01:00
parent 98901f2770
commit 3f52d95bbf
10 changed files with 46 additions and 34 deletions
+6 -1
View File
@@ -220,7 +220,12 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> with Logg
double getBMR() {
var date = DateTime.now();
if (weight == null || height == null || height == 0 || weight == 0) {
if (weight == null ||
height == null ||
height == 0 ||
weight == 0 ||
customerRepository.customer == null ||
customerRepository.customer!.birthYear == null) {
this.bmi = 0;
return 0;
}