forked from eatvio/eatvio_app
Layout imporvements
This commit is contained in:
@@ -29,8 +29,10 @@ class MyProfileScreen extends StatelessWidget {
|
||||
builder: (context, state) {
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
appBar:
|
||||
_buildAppBar(context, state.user?['name'] ?? 'loading'.tr),
|
||||
appBar: _buildAppBar(
|
||||
context,
|
||||
state.user?['name'] + ' ' + state.userDetails?['last_name'] ??
|
||||
'loading'.tr),
|
||||
body: Container(
|
||||
width: double.maxFinite,
|
||||
padding:
|
||||
@@ -543,176 +545,196 @@ class MyProfileScreen extends StatelessWidget {
|
||||
Widget _buildWidget(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(left: 7.h),
|
||||
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 15.h),
|
||||
child: Text("msg".tr,
|
||||
style: CustomTextStyles.titleSmallBluegray800)),
|
||||
SizedBox(
|
||||
height: 95.v,
|
||||
width: 343.h,
|
||||
child: Stack(alignment: Alignment.bottomCenter, children: [
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: SizedBox(
|
||||
height: 40.v,
|
||||
width: 343.h,
|
||||
child:
|
||||
Stack(alignment: Alignment.bottomRight, children: [
|
||||
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("lbl12".tr,
|
||||
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("done".tr,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: theme.textTheme.titleSmall)))
|
||||
]))),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
height: 40.v,
|
||||
width: 343.h,
|
||||
margin: EdgeInsets.only(bottom: 21.v),
|
||||
child:
|
||||
Stack(alignment: Alignment.bottomRight, children: [
|
||||
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, top: 1.v),
|
||||
child: Text("lbl14".tr,
|
||||
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("done".tr,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: theme.textTheme.titleSmall)))
|
||||
]))),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 66.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: 2.v),
|
||||
child: Text("lbl15".tr,
|
||||
style: CustomTextStyles
|
||||
.titleSmallBluegray800Bold)),
|
||||
SizedBox(
|
||||
height: 19.v,
|
||||
width: 94.h,
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomCenter,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Container(
|
||||
height: 19.v,
|
||||
width: 94.h,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
appTheme.deepOrange900,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
5.h)))),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Text("in_progress".tr,
|
||||
style:
|
||||
theme.textTheme.titleSmall))
|
||||
]))
|
||||
]))),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 5.h, vertical: 0.5.v),
|
||||
decoration: AppDecoration.outlineBlueGray.copyWith(
|
||||
borderRadius: BorderRadiusStyle.roundedBorder5),
|
||||
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),
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imgEllipse2,
|
||||
height: 25.adaptSize,
|
||||
width: 25.adaptSize,
|
||||
radius: BorderRadius.circular(12.h)),
|
||||
SizedBox(height: 8.v),
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imgEllipse3,
|
||||
height: 25.adaptSize,
|
||||
width: 25.adaptSize,
|
||||
radius: BorderRadius.circular(12.h))
|
||||
])))
|
||||
]))
|
||||
]));
|
||||
child: Container(
|
||||
decoration: AppDecoration.outlineBlueGray
|
||||
.copyWith(borderRadius: BorderRadiusStyle.roundedBorder5),
|
||||
child:
|
||||
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 15.h),
|
||||
child: Text("msg".tr,
|
||||
style: CustomTextStyles.titleSmallBluegray800)),
|
||||
SizedBox(
|
||||
height: 95.v,
|
||||
width: 343.h,
|
||||
child: Stack(alignment: Alignment.bottomCenter, children: [
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: SizedBox(
|
||||
height: 40.v,
|
||||
width: 343.h,
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomRight,
|
||||
children: [
|
||||
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("lbl12".tr,
|
||||
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("done".tr,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style:
|
||||
theme.textTheme.titleSmall)))
|
||||
]))),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
height: 40.v,
|
||||
width: 343.h,
|
||||
margin: EdgeInsets.only(bottom: 21.v),
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomRight,
|
||||
children: [
|
||||
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, top: 1.v),
|
||||
child: Text("lbl14".tr,
|
||||
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("done".tr,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style:
|
||||
theme.textTheme.titleSmall)))
|
||||
]))),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 66.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: 2.v),
|
||||
child: Text("lbl15".tr,
|
||||
style: CustomTextStyles
|
||||
.titleSmallBluegray800Bold)),
|
||||
SizedBox(
|
||||
height: 19.v,
|
||||
width: 94.h,
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomCenter,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Container(
|
||||
height: 19.v,
|
||||
width: 94.h,
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme
|
||||
.deepOrange900,
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(
|
||||
5.h)))),
|
||||
Align(
|
||||
alignment:
|
||||
Alignment.bottomCenter,
|
||||
child: Text("in_progress".tr,
|
||||
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),
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imgEllipse2,
|
||||
height: 25.adaptSize,
|
||||
width: 25.adaptSize,
|
||||
radius: BorderRadius.circular(12.h)),
|
||||
SizedBox(height: 8.v),
|
||||
CustomImageView(
|
||||
imagePath: ImageConstant.imgEllipse3,
|
||||
height: 25.adaptSize,
|
||||
width: 25.adaptSize,
|
||||
radius: BorderRadius.circular(12.h))
|
||||
])))
|
||||
]))
|
||||
])));
|
||||
}
|
||||
|
||||
List<double> _bodyMassIndex(List<double> weightPoints, int height) {
|
||||
|
||||
Reference in New Issue
Block a user