New locales and colors for plans

This commit is contained in:
2024-01-18 16:00:06 +03:00
parent d6a887c4c8
commit bbb8915b93

View File

@@ -560,7 +560,7 @@ class MyProfileScreen extends StatelessWidget {
/// Section Widget /// Section Widget
Widget _buildPlans(BuildContext context, List<dynamic>? plans, Widget _buildPlans(BuildContext context, List<dynamic>? plans,
List<dynamic>? image_paths, 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: Container(
@@ -583,6 +583,21 @@ class MyProfileScreen extends StatelessWidget {
itemCount: plans?.length ?? 0, itemCount: plans?.length ?? 0,
itemBuilder: (context, i) { itemBuilder: (context, i) {
String state = states?[i]; String state = states?[i];
var boxColor = appTheme.greenA700;
switch (states?[i]) {
case 'active':
boxColor = appTheme.greenA700;
break;
case 'archived': // График ИМТ
boxColor = appTheme.gray400;
break;
case 'draft': //График обхватов
boxColor = appTheme.deepOrange900;
break;
case 'in_progress': //График обхватов
boxColor = appTheme.lightGreen300;
break;
}
return SizedBox( return SizedBox(
height: 40.v, height: 40.v,
width: 343.h, width: 343.h,
@@ -619,32 +634,31 @@ class MyProfileScreen extends StatelessWidget {
height: 19.v, height: 19.v,
width: 100.h, width: 100.h,
decoration: BoxDecoration( decoration: BoxDecoration(
color: appTheme color: boxColor,
.greenA700,
borderRadius: borderRadius:
BorderRadius BorderRadius
.circular( .circular(
5.h))) 5.h)))
]))), ]))),
/*Align( Align(
alignment: Alignment.center, alignment: Alignment.center,
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: 12.h), bottom: 12.h),
child: Image.network( child: Image.network(
dotenv.env['STORAGE_URL']! + dotenv.env['STORAGE_URL']! +
image_paths?[i], imagePaths?[i],
height: 25.adaptSize, height: 25.adaptSize,
width: 25.adaptSize, width: 25.adaptSize,
))),*/ ))),
Align( Align(
alignment: Alignment.bottomRight, alignment: Alignment.bottomRight,
child: Container( child: Container(
width: 60.h, width: 70.h,
margin: EdgeInsets.only( margin: EdgeInsets.only(
bottom: 13.h, right: 22.h), bottom: 14.h, right: 22.h),
child: Text("$state".tr, child: Text("$state".tr,
maxLines: 2, maxLines: 3,
overflow: overflow:
TextOverflow.ellipsis, TextOverflow.ellipsis,
style: theme style: theme