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