forked from eatvio/eatvio_app
Layout fix
This commit is contained in:
@@ -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<dynamic>? plans, List<dynamic>? image_paths) {
|
||||
Widget _buildPlans(BuildContext context, List<dynamic>? plans,
|
||||
List<dynamic>? image_paths, List<dynamic>? 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),
|
||||
])))
|
||||
]))
|
||||
])));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user