From 976b8fbda9a4c3803c0abc8ecda5e5b9672c37df Mon Sep 17 00:00:00 2001 From: maxxkim Date: Wed, 17 Jan 2024 15:34:52 +0300 Subject: [PATCH] Layout fix --- .../my_profile_screen/my_profile_screen.dart | 138 ++++++++---------- 1 file changed, 59 insertions(+), 79 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 ceb740d4..8226aeeb 100644 --- a/lib/presentation/profile/my_profile_screen/my_profile_screen.dart +++ b/lib/presentation/profile/my_profile_screen/my_profile_screen.dart @@ -135,9 +135,11 @@ class MyProfileScreen extends StatelessWidget { ), SizedBox(height: 15.v), _buildPlans( - context, - state.plans?.map((plan) => plan['name']).toList(), - state.plans?.map((plan) => plan['image']).toList()), + context, + state.plans?.map((plan) => plan['name']).toList(), + state.plans?.map((plan) => plan['image']).toList(), + state.plans?.map((plan) => plan['status']).toList(), + ), SizedBox(height: 5.v), ])), bottomNavigationBar: _buildBottomBar(context))); @@ -559,8 +561,8 @@ class MyProfileScreen extends StatelessWidget { } /// Section Widget - Widget _buildPlans( - BuildContext context, List? plans, List? image_paths) { + Widget _buildPlans(BuildContext context, List? plans, + List? image_paths, List? statuses) { return Padding( padding: EdgeInsets.only(left: 7.h), child: Container( @@ -584,82 +586,60 @@ class MyProfileScreen extends StatelessWidget { child: Stack( alignment: Alignment.bottomRight, children: [ - ListView.builder( - itemCount: plans!.length, - itemBuilder: - (BuildContext context, int i) { - String name = plans[i]['name']; - String imagePath = - image_paths![i]['path']; - return Align( - alignment: Alignment.topCenter, - child: Container( - margin: EdgeInsets.only( - bottom: 11.v), - padding: EdgeInsets.symmetric( - horizontal: 6.h, - vertical: 4.v), - decoration: AppDecoration - .fillGray - .copyWith( + Align( + alignment: Alignment.topCenter, + child: Container( + margin: EdgeInsets.only(bottom: 11.v), + padding: EdgeInsets.symmetric( + horizontal: 6.h, vertical: 4.v), + decoration: AppDecoration.fillGray + .copyWith( + borderRadius: + BorderRadiusStyle + .roundedBorder5), + child: Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Padding( + padding: EdgeInsets.only( + left: 38.h, + bottom: 1.v), + child: Text("plan_name", + style: CustomTextStyles + .titleSmallBluegray800Bold)), + Container( + height: 19.v, + width: 82.h, + decoration: BoxDecoration( + color: + appTheme.greenA700, borderRadius: - BorderRadiusStyle - .roundedBorder5), - child: Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - Padding( - padding: - EdgeInsets.only( - left: 38.h, - bottom: 1.v), - child: Text( - "plan_name", - style: CustomTextStyles - .titleSmallBluegray800Bold)), - Container( - height: 19.v, - width: 82.h, - decoration: BoxDecoration( - color: appTheme - .greenA700, - borderRadius: - BorderRadius - .circular( - 5.h))) - ]))); - Align( - alignment: Alignment.bottomRight, - child: Container( - width: 40.h, - margin: EdgeInsets.only( - right: 30.h), - child: Text("plan_status", - maxLines: 2, - overflow: - TextOverflow.ellipsis, - style: theme.textTheme - .titleSmall))); - }) + BorderRadius + .circular(5.h))) + ]))), + Align( + alignment: Alignment.center, + child: Container( + child: CustomImageView( + imagePath: + ImageConstant.imgEllipse3, + height: 25.adaptSize, + width: 25.adaptSize, + radius: BorderRadius.circular( + 12.h)))), + Align( + alignment: Alignment.bottomRight, + child: Container( + width: 40.h, + margin: EdgeInsets.only(right: 30.h), + child: Text("plan_status", + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: + theme.textTheme.titleSmall))) ]))), - Align( - alignment: Alignment.center, - child: Container( - padding: EdgeInsets.symmetric( - horizontal: 5.h, vertical: 0.5.v), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - CustomImageView( - imagePath: ImageConstant.imgEllipse125x25, - height: 25.adaptSize, - width: 25.adaptSize, - radius: BorderRadius.circular(12.h)), - SizedBox(height: 8.v), - ]))) ])) ]))); }