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
Widget _buildPlans(BuildContext context, List<dynamic>? plans,
List<dynamic>? image_paths, List<dynamic>? states) {
List<dynamic>? imagePaths, List<dynamic>? states) {
return Padding(
padding: EdgeInsets.only(left: 7.h),
child: Container(
@@ -583,6 +583,21 @@ class MyProfileScreen extends StatelessWidget {
itemCount: plans?.length ?? 0,
itemBuilder: (context, 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(
height: 40.v,
width: 343.h,
@@ -619,32 +634,31 @@ class MyProfileScreen extends StatelessWidget {
height: 19.v,
width: 100.h,
decoration: BoxDecoration(
color: appTheme
.greenA700,
color: boxColor,
borderRadius:
BorderRadius
.circular(
5.h)))
]))),
/*Align(
Align(
alignment: Alignment.center,
child: Container(
margin: EdgeInsets.only(
bottom: 12.h),
child: Image.network(
dotenv.env['STORAGE_URL']! +
image_paths?[i],
imagePaths?[i],
height: 25.adaptSize,
width: 25.adaptSize,
))),*/
))),
Align(
alignment: Alignment.bottomRight,
child: Container(
width: 60.h,
width: 70.h,
margin: EdgeInsets.only(
bottom: 13.h, right: 22.h),
bottom: 14.h, right: 22.h),
child: Text("$state".tr,
maxLines: 2,
maxLines: 3,
overflow:
TextOverflow.ellipsis,
style: theme