From e682a59f9c83af8526fa273e1a8d2ea88a804fdd Mon Sep 17 00:00:00 2001 From: Anastasiia Reshetnik Date: Mon, 29 Jan 2024 13:35:16 +0300 Subject: [PATCH] Fixed iOS version. Stable state control --- .../my_profile_screen/my_profile_screen.dart | 32 +++++++++---------- .../my_profile_screen/my_settings_screen.dart | 2 +- 2 files changed, 17 insertions(+), 17 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 ee5db671..b4ce97aa 100644 --- a/lib/presentation/profile/my_profile_screen/my_profile_screen.dart +++ b/lib/presentation/profile/my_profile_screen/my_profile_screen.dart @@ -34,7 +34,7 @@ class MyProfileScreen extends StatelessWidget { builder: (context, state) { if (state is MyProfileInitialState) { // Это начальное состояние, данные ещё не загружены. - return CircularProgressIndicator(); + return CircularProgressIndicator(color: Colors.white, backgroundColor: Colors.white,); } else if (state is MyProfileLoadedState) { // Данные загружены, можно строить экран. return _buildMyProfileScreen(context, state); @@ -66,7 +66,7 @@ class MyProfileScreen extends StatelessWidget { _buildSettings(context), SizedBox(height: 30.v), CarouselSlider( - options: CarouselOptions(height: 370.0), + options: CarouselOptions(height: 375.0), items: [1, 2, 3].map((chartType) { return Builder( builder: (BuildContext context) { @@ -316,9 +316,7 @@ class MyProfileScreen extends StatelessWidget { return Padding( padding: const EdgeInsets.only( left: 12, - bottom: 12, right: 20, - top: 18, ), child: AspectRatio( aspectRatio: 1, @@ -504,9 +502,7 @@ class MyProfileScreen extends StatelessWidget { return Padding( padding: const EdgeInsets.only( left: 12, - bottom: 12, right: 20, - top: 18, ), child: AspectRatio( aspectRatio: 1, @@ -641,15 +637,19 @@ class MyProfileScreen extends StatelessWidget { List? imagePaths, List? states) { return Padding( padding: EdgeInsets.only(left: 7.h), - child: Container( + child: + Column(children: + [ + Padding( + padding: EdgeInsets.only(left: 15.h), + child: Text("plans_complete".tr, + style: CustomTextStyles.titleSmallBluegray800)), + Container( decoration: AppDecoration.outlineBlueGray .copyWith(borderRadius: BorderRadiusStyle.roundedBorder5), child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding( - padding: EdgeInsets.only(left: 15.h), - child: Text("plans_complete".tr, - style: CustomTextStyles.titleSmallBluegray800)), + SizedBox( height: 95.v, width: 343.h, @@ -666,13 +666,13 @@ class MyProfileScreen extends StatelessWidget { case 'active': boxColor = appTheme.greenA700; break; - case 'archived': // График ИМТ + case 'archived': boxColor = appTheme.gray400; break; - case 'draft': //График обхватов + case 'draft': boxColor = appTheme.deepOrange900; break; - case 'in_progress': //График обхватов + case 'in_progress': boxColor = appTheme.lightGreen300; break; } @@ -734,7 +734,7 @@ class MyProfileScreen extends StatelessWidget { child: Container( width: 70.h, margin: EdgeInsets.only( - bottom: 14.h, right: 22.h), + right: 22.h), child: Text("$state".tr, maxLines: 3, overflow: @@ -744,7 +744,7 @@ class MyProfileScreen extends StatelessWidget { ])); })), ])) - ]))); + ]))])); } List _bodyMassIndex(List weightPoints, int height) { diff --git a/lib/presentation/profile/my_profile_screen/my_settings_screen.dart b/lib/presentation/profile/my_profile_screen/my_settings_screen.dart index 802a97a0..f3f0f1ad 100644 --- a/lib/presentation/profile/my_profile_screen/my_settings_screen.dart +++ b/lib/presentation/profile/my_profile_screen/my_settings_screen.dart @@ -24,7 +24,7 @@ class MySettingsScreen extends StatelessWidget { builder: (context, state) { if (state is MyProfileInitialState) { // Это начальное состояние, данные ещё не загружены. - return CircularProgressIndicator(); + return CircularProgressIndicator(color: Colors.white, backgroundColor: Colors.white,); } else if (state is MyProfileLoadedState) { // Данные загружены, можно строить экран. return _buildSetingsScreen(context, state);