From f52622aa1d1140df8de91c242ce584fd2351d912 Mon Sep 17 00:00:00 2001 From: maxxkim Date: Fri, 2 Feb 2024 22:48:18 +0300 Subject: [PATCH] [profile]: Finished client-side validation of weight_measures and circumference_measures according to API specifics --- .../my_profile_screen/my_profile_screen.dart | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/lib/presentation/profile/my_profile_screen/my_profile_screen.dart b/lib/presentation/profile/my_profile_screen/my_profile_screen.dart index 4bba5610..49db12bd 100644 --- a/lib/presentation/profile/my_profile_screen/my_profile_screen.dart +++ b/lib/presentation/profile/my_profile_screen/my_profile_screen.dart @@ -183,19 +183,11 @@ class MyProfileScreen extends StatelessWidget { ), ), SizedBox(height: 50.v), - /*_buildChart( + _buildChart( context, - _bodyMassIndex( - state.chartPoints?.values - .map((e) => e['weight']) - .toList() - .map((i) => i.toDouble()) - .toList() ?? - [10.0, 20.0, 30.0, 40.0], + _bodyMassIndex(state.chartPoints ?? [0.0, 0.0, 0.0, 0.0], state.userDetails?['height'].toInt() ?? 160), - state.chartPoints?.values - .map((e) => e['created_at']) - .toList()),*/ + state.chartDates), ]); case 3: //График обхватов return GestureDetector( @@ -210,13 +202,9 @@ class MyProfileScreen extends StatelessWidget { ), ), SizedBox(height: 30.v), - /*_buildCircumferenceChart( - context, - state.circumferences, - state.chartPoints?.values - .map((e) => e['created_at']) - .toList()), - _buildChartLegend()*/ + _buildCircumferenceChart( + context, state.circumferences, state.chartDates), + _buildChartLegend() ])); default: return Text('text', style: TextStyle(fontSize: 16.0));