forked from eatvio/eatvio_app
fix: remove sizer
This commit is contained in:
@@ -73,11 +73,11 @@ class MyProfileScreen extends StatelessWidget {
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 30.v),
|
||||
SizedBox(height: 30),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -93,11 +93,11 @@ class MyProfileScreen extends StatelessWidget {
|
||||
),
|
||||
child: _buildInfo(context, state),
|
||||
),
|
||||
SizedBox(height: 15.v),
|
||||
SizedBox(height: 15),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -113,12 +113,12 @@ class MyProfileScreen extends StatelessWidget {
|
||||
),
|
||||
child: _buildCarousel(context, state),
|
||||
),
|
||||
SizedBox(height: 15.v),
|
||||
SizedBox(height: 15),
|
||||
if (!state.plans!.isEmpty)
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -139,7 +139,7 @@ class MyProfileScreen extends StatelessWidget {
|
||||
state.plans?.map((plan) => plan['state']).toList(),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 5.v),
|
||||
SizedBox(height: 5),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -169,7 +169,7 @@ class MyProfileScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
AppbarSubtitle(text: state.user?['name'] ?? ''),
|
||||
SizedBox(height: 20.v),
|
||||
SizedBox(height: 20),
|
||||
Text(state.userDetails?['additional_info'] ?? ''),
|
||||
],
|
||||
);
|
||||
@@ -207,7 +207,7 @@ class MyProfileScreen extends StatelessWidget {
|
||||
color: appTheme.black900,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 50.v),
|
||||
SizedBox(height: 50),
|
||||
_buildChart(
|
||||
context,
|
||||
state.chartPoints?.values.map<int>((e) => e['weight']).toList().map((i) => i.toDouble()).toList() ?? [0.0, 0.0, 0.0, 0.0],
|
||||
@@ -225,7 +225,7 @@ class MyProfileScreen extends StatelessWidget {
|
||||
color: appTheme.black900,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 50.v),
|
||||
SizedBox(height: 50),
|
||||
_buildChart(
|
||||
context,
|
||||
_bodyMassIndex(
|
||||
@@ -247,7 +247,7 @@ class MyProfileScreen extends StatelessWidget {
|
||||
color: appTheme.black900,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30.v),
|
||||
SizedBox(height: 30),
|
||||
_buildCircumferenceChart(context, state.circumferences, state.chartDates),
|
||||
_buildChartLegend(),
|
||||
],
|
||||
@@ -646,22 +646,22 @@ class MyProfileScreen extends StatelessWidget {
|
||||
/// Section Widget
|
||||
_buildPlans(BuildContext context, List<dynamic>? plans, List<dynamic>? imagePaths, List<dynamic>? states) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(left: 7.h),
|
||||
padding: EdgeInsets.only(left: 7),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 15.h),
|
||||
padding: EdgeInsets.only(left: 15),
|
||||
child: Text("plans_complete".tr, style: CustomTextStyles.titleMediumBlack.copyWith(color: appTheme.black900)),
|
||||
),
|
||||
SizedBox(height: 5.v),
|
||||
SizedBox(height: 5),
|
||||
Container(
|
||||
decoration: AppDecoration.outlineBlueGray.copyWith(borderRadius: BorderRadiusStyle.roundedBorder5),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 105.v,
|
||||
width: 343.h,
|
||||
height: 105,
|
||||
width: 343,
|
||||
child: Stack(
|
||||
alignment: Alignment.bottomCenter,
|
||||
children: [
|
||||
@@ -687,28 +687,28 @@ class MyProfileScreen extends StatelessWidget {
|
||||
break;
|
||||
}
|
||||
return SizedBox(
|
||||
height: 40.v,
|
||||
width: 343.h,
|
||||
height: 40,
|
||||
width: 343,
|
||||
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),
|
||||
margin: EdgeInsets.only(bottom: 11),
|
||||
padding: EdgeInsets.symmetric(horizontal: 6, vertical: 4),
|
||||
decoration: AppDecoration.fillGray.copyWith(borderRadius: BorderRadiusStyle.roundedBorder5),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 1.v),
|
||||
padding: EdgeInsets.only(bottom: 1),
|
||||
child: Text(plans![i], style: CustomTextStyles.titleSmallBluegray800Bold),
|
||||
),
|
||||
Container(
|
||||
height: 19.v,
|
||||
width: 100.h,
|
||||
decoration: BoxDecoration(color: boxColor, borderRadius: BorderRadius.circular(5.h)),
|
||||
height: 19,
|
||||
width: 100,
|
||||
decoration: BoxDecoration(color: boxColor, borderRadius: BorderRadius.circular(5)),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -717,19 +717,19 @@ class MyProfileScreen extends StatelessWidget {
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 12.h),
|
||||
margin: EdgeInsets.only(bottom: 12),
|
||||
child: Image.network(
|
||||
baseUrl + '/storage/' + imagePaths?[i],
|
||||
height: 25.adaptSize,
|
||||
width: 25.adaptSize,
|
||||
height: 24,
|
||||
width: 24,
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
child: Container(
|
||||
width: 70.h,
|
||||
margin: EdgeInsets.only(bottom: 14.h, right: 22.h),
|
||||
width: 70,
|
||||
margin: EdgeInsets.only(bottom: 14, right: 22),
|
||||
child: Text("$state".tr, maxLines: 3, overflow: TextOverflow.ellipsis, style: theme.textTheme.titleSmall),
|
||||
),
|
||||
),
|
||||
@@ -773,10 +773,10 @@ class MyProfileScreen extends StatelessWidget {
|
||||
child: ListView(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.v),
|
||||
padding: EdgeInsets.symmetric(vertical: 5),
|
||||
child: Text("chest_circumference".tr, style: theme.textTheme.bodyLarge),
|
||||
),
|
||||
SizedBox(height: 5.v),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFormField(
|
||||
controller: state.chestCircumferenceController,
|
||||
keyboardType: TextInputType.number,
|
||||
@@ -785,10 +785,10 @@ class MyProfileScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 15.v),
|
||||
padding: EdgeInsets.symmetric(vertical: 15),
|
||||
child: Text("waist_circumference".tr, style: theme.textTheme.bodyLarge),
|
||||
),
|
||||
SizedBox(height: 5.v),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFormField(
|
||||
controller: state.waistCircumferenceController,
|
||||
keyboardType: TextInputType.number,
|
||||
@@ -797,10 +797,10 @@ class MyProfileScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 15.v),
|
||||
padding: EdgeInsets.symmetric(vertical: 15),
|
||||
child: Text("hip_circumference".tr, style: theme.textTheme.bodyLarge),
|
||||
),
|
||||
SizedBox(height: 5.v),
|
||||
SizedBox(height: 5),
|
||||
CustomTextFormField(
|
||||
controller: state.hipCircumferenceController,
|
||||
keyboardType: TextInputType.number,
|
||||
|
||||
@@ -78,24 +78,24 @@ class MySettingsScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
child: CustomAppBar(
|
||||
height: 54.v,
|
||||
leadingWidth: 28.h,
|
||||
height: 54,
|
||||
leadingWidth: 28,
|
||||
leading: AppbarLeadingImage(
|
||||
imagePath: ImageConstant.imgArrowLeft,
|
||||
margin: EdgeInsets.only(left: 16.h, top: 15.v, bottom: 15.v),
|
||||
margin: EdgeInsets.only(left: 16, top: 15, bottom: 15),
|
||||
onTap: () => GoRouter.of(context).pop(),
|
||||
),
|
||||
title: Padding(
|
||||
padding: EdgeInsets.only(left: 20.h),
|
||||
child: Row(children: [AppbarSubtitle(text: state.user?['name'], margin: EdgeInsets.only(left: 80.h, top: 12.v, bottom: 9.v))]),
|
||||
padding: EdgeInsets.only(left: 20),
|
||||
child: Row(children: [AppbarSubtitle(text: state.user?['name'], margin: EdgeInsets.only(left: 80, top: 12, bottom: 9))]),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -119,8 +119,8 @@ class MySettingsScreen extends StatelessWidget {
|
||||
SizedBox(height: 20),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
@@ -145,8 +145,8 @@ class MySettingsScreen extends StatelessWidget {
|
||||
SizedBox(height: 20),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.h,
|
||||
vertical: 12.v,
|
||||
horizontal: 24,
|
||||
vertical: 12,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
|
||||
Reference in New Issue
Block a user