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 696e31f8..45b7c1cf 100644 --- a/lib/presentation/profile/my_profile_screen/my_profile_screen.dart +++ b/lib/presentation/profile/my_profile_screen/my_profile_screen.dart @@ -560,7 +560,7 @@ class MyProfileScreen extends StatelessWidget { /// Section Widget Widget _buildPlans(BuildContext context, List? plans, - List? image_paths, List? states) { + List? imagePaths, List? states) { return Padding( padding: EdgeInsets.only(left: 7.h), child: Container( @@ -583,6 +583,21 @@ class MyProfileScreen extends StatelessWidget { itemCount: plans?.length ?? 0, itemBuilder: (context, i) { String state = states?[i]; + var boxColor = appTheme.greenA700; + switch (states?[i]) { + case 'active': + boxColor = appTheme.greenA700; + break; + case 'archived': // График ИМТ + boxColor = appTheme.gray400; + break; + case 'draft': //График обхватов + boxColor = appTheme.deepOrange900; + break; + case 'in_progress': //График обхватов + boxColor = appTheme.lightGreen300; + break; + } return SizedBox( height: 40.v, width: 343.h, @@ -619,32 +634,31 @@ class MyProfileScreen extends StatelessWidget { height: 19.v, width: 100.h, decoration: BoxDecoration( - color: appTheme - .greenA700, + color: boxColor, borderRadius: BorderRadius .circular( 5.h))) ]))), - /*Align( + Align( alignment: Alignment.center, child: Container( margin: EdgeInsets.only( bottom: 12.h), child: Image.network( dotenv.env['STORAGE_URL']! + - image_paths?[i], + imagePaths?[i], height: 25.adaptSize, width: 25.adaptSize, - ))),*/ + ))), Align( alignment: Alignment.bottomRight, child: Container( - width: 60.h, + width: 70.h, margin: EdgeInsets.only( - bottom: 13.h, right: 22.h), + bottom: 14.h, right: 22.h), child: Text("$state".tr, - maxLines: 2, + maxLines: 3, overflow: TextOverflow.ellipsis, style: theme