forked from eatvio/eatvio_app
Fixed iOS version. Stable state control
This commit is contained in:
@@ -34,7 +34,7 @@ class MyProfileScreen extends StatelessWidget {
|
|||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
if (state is MyProfileInitialState) {
|
if (state is MyProfileInitialState) {
|
||||||
// Это начальное состояние, данные ещё не загружены.
|
// Это начальное состояние, данные ещё не загружены.
|
||||||
return CircularProgressIndicator();
|
return CircularProgressIndicator(color: Colors.white, backgroundColor: Colors.white,);
|
||||||
} else if (state is MyProfileLoadedState) {
|
} else if (state is MyProfileLoadedState) {
|
||||||
// Данные загружены, можно строить экран.
|
// Данные загружены, можно строить экран.
|
||||||
return _buildMyProfileScreen(context, state);
|
return _buildMyProfileScreen(context, state);
|
||||||
@@ -66,7 +66,7 @@ class MyProfileScreen extends StatelessWidget {
|
|||||||
_buildSettings(context),
|
_buildSettings(context),
|
||||||
SizedBox(height: 30.v),
|
SizedBox(height: 30.v),
|
||||||
CarouselSlider(
|
CarouselSlider(
|
||||||
options: CarouselOptions(height: 370.0),
|
options: CarouselOptions(height: 375.0),
|
||||||
items: [1, 2, 3].map((chartType) {
|
items: [1, 2, 3].map((chartType) {
|
||||||
return Builder(
|
return Builder(
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
@@ -316,9 +316,7 @@ class MyProfileScreen extends StatelessWidget {
|
|||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
left: 12,
|
left: 12,
|
||||||
bottom: 12,
|
|
||||||
right: 20,
|
right: 20,
|
||||||
top: 18,
|
|
||||||
),
|
),
|
||||||
child: AspectRatio(
|
child: AspectRatio(
|
||||||
aspectRatio: 1,
|
aspectRatio: 1,
|
||||||
@@ -504,9 +502,7 @@ class MyProfileScreen extends StatelessWidget {
|
|||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
left: 12,
|
left: 12,
|
||||||
bottom: 12,
|
|
||||||
right: 20,
|
right: 20,
|
||||||
top: 18,
|
|
||||||
),
|
),
|
||||||
child: AspectRatio(
|
child: AspectRatio(
|
||||||
aspectRatio: 1,
|
aspectRatio: 1,
|
||||||
@@ -641,15 +637,19 @@ class MyProfileScreen extends StatelessWidget {
|
|||||||
List<dynamic>? imagePaths, List<dynamic>? states) {
|
List<dynamic>? imagePaths, List<dynamic>? states) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.only(left: 7.h),
|
padding: EdgeInsets.only(left: 7.h),
|
||||||
child: Container(
|
child:
|
||||||
|
Column(children:
|
||||||
|
[
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(left: 15.h),
|
||||||
|
child: Text("plans_complete".tr,
|
||||||
|
style: CustomTextStyles.titleSmallBluegray800)),
|
||||||
|
Container(
|
||||||
decoration: AppDecoration.outlineBlueGray
|
decoration: AppDecoration.outlineBlueGray
|
||||||
.copyWith(borderRadius: BorderRadiusStyle.roundedBorder5),
|
.copyWith(borderRadius: BorderRadiusStyle.roundedBorder5),
|
||||||
child:
|
child:
|
||||||
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(left: 15.h),
|
|
||||||
child: Text("plans_complete".tr,
|
|
||||||
style: CustomTextStyles.titleSmallBluegray800)),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 95.v,
|
height: 95.v,
|
||||||
width: 343.h,
|
width: 343.h,
|
||||||
@@ -666,13 +666,13 @@ class MyProfileScreen extends StatelessWidget {
|
|||||||
case 'active':
|
case 'active':
|
||||||
boxColor = appTheme.greenA700;
|
boxColor = appTheme.greenA700;
|
||||||
break;
|
break;
|
||||||
case 'archived': // График ИМТ
|
case 'archived':
|
||||||
boxColor = appTheme.gray400;
|
boxColor = appTheme.gray400;
|
||||||
break;
|
break;
|
||||||
case 'draft': //График обхватов
|
case 'draft':
|
||||||
boxColor = appTheme.deepOrange900;
|
boxColor = appTheme.deepOrange900;
|
||||||
break;
|
break;
|
||||||
case 'in_progress': //График обхватов
|
case 'in_progress':
|
||||||
boxColor = appTheme.lightGreen300;
|
boxColor = appTheme.lightGreen300;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -734,7 +734,7 @@ class MyProfileScreen extends StatelessWidget {
|
|||||||
child: Container(
|
child: Container(
|
||||||
width: 70.h,
|
width: 70.h,
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
bottom: 14.h, right: 22.h),
|
right: 22.h),
|
||||||
child: Text("$state".tr,
|
child: Text("$state".tr,
|
||||||
maxLines: 3,
|
maxLines: 3,
|
||||||
overflow:
|
overflow:
|
||||||
@@ -744,7 +744,7 @@ class MyProfileScreen extends StatelessWidget {
|
|||||||
]));
|
]));
|
||||||
})),
|
})),
|
||||||
]))
|
]))
|
||||||
])));
|
]))]));
|
||||||
}
|
}
|
||||||
|
|
||||||
List<double> _bodyMassIndex(List<double> weightPoints, int height) {
|
List<double> _bodyMassIndex(List<double> weightPoints, int height) {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class MySettingsScreen extends StatelessWidget {
|
|||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
if (state is MyProfileInitialState) {
|
if (state is MyProfileInitialState) {
|
||||||
// Это начальное состояние, данные ещё не загружены.
|
// Это начальное состояние, данные ещё не загружены.
|
||||||
return CircularProgressIndicator();
|
return CircularProgressIndicator(color: Colors.white, backgroundColor: Colors.white,);
|
||||||
} else if (state is MyProfileLoadedState) {
|
} else if (state is MyProfileLoadedState) {
|
||||||
// Данные загружены, можно строить экран.
|
// Данные загружены, можно строить экран.
|
||||||
return _buildSetingsScreen(context, state);
|
return _buildSetingsScreen(context, state);
|
||||||
|
|||||||
Reference in New Issue
Block a user