diff --git a/lib/new_views/pages/land_page/requests/gas_refill_item_view.dart b/lib/new_views/pages/land_page/requests/gas_refill_item_view.dart index 7891e830..fa68746a 100644 --- a/lib/new_views/pages/land_page/requests/gas_refill_item_view.dart +++ b/lib/new_views/pages/land_page/requests/gas_refill_item_view.dart @@ -7,7 +7,6 @@ import 'package:test_sa/extensions/widget_extensions.dart'; import 'package:test_sa/models/all_requests_and_count_model.dart'; import 'package:test_sa/models/new_models/gas_refill_model.dart'; import 'package:test_sa/views/app_style/colors.dart'; -import 'package:test_sa/views/app_style/sizing.dart'; import 'package:test_sa/views/pages/user/gas_refill/gas_refill_details.dart'; import 'package:test_sa/views/widgets/requests/request_status.dart'; @@ -28,20 +27,25 @@ class GasRefillItemView extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ StatusLabel( - label: request.priority, - // id: , - textColor: AColors.getRequestStatusTextColorByName(request.priority), - backgroundColor: AColors.getRequestStatusColorByName(request.priority)), + label: request.priority, + // id: , + textColor: AColors.getRequestStatusTextColorByName(request.priority), + backgroundColor: AColors.getRequestStatusColorByName(request.priority), + ), 8.width, - StatusLabel(label: request.status, textColor: AColors.getRequestStatusTextColorByName(request.status), backgroundColor: AColors.getRequestStatusColorByName(request.status)), + StatusLabel( + label: request.status, + textColor: AColors.getRequestStatusTextColorByName(request.status), + backgroundColor: AColors.getRequestStatusColorByName(request.status), + ), 1.width.expanded, - Text(request.date?.toServiceRequestCardFormat ?? "", textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: context.isDark?AppColor.neutral10: Color(0xFF3B3D4A))), + Text(request.date?.toServiceRequestCardFormat ?? "", textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: context.isDark ? AppColor.neutral10 : Color(0xFF3B3D4A))), ], ), 8.height, context.translation.gasRefillRequest.heading5(context), - '${context.translation.gasType}: ${request.gasType}'.bodyText(context), - '${context.translation.site}: ${request.site}'.bodyText(context), + '${context.translation.gasType}: ${request.gasType}'.bodyText(context), + '${context.translation.site}: ${request.site}'.bodyText(context), 8.height, Row( mainAxisSize: MainAxisSize.min, diff --git a/lib/views/pages/user/gas_refill/gas_refill_details.dart b/lib/views/pages/user/gas_refill/gas_refill_details.dart index 068e5490..05fd47b9 100644 --- a/lib/views/pages/user/gas_refill/gas_refill_details.dart +++ b/lib/views/pages/user/gas_refill/gas_refill_details.dart @@ -98,9 +98,10 @@ class _GasRefillDetailsPageState extends State { //), // 8.width, StatusLabel( - label: gasRefillModel.status?.name ?? "", - textColor: AColors.getRequestStatusTextColor(gasRefillModel.status?.value ?? 0), - backgroundColor: AColors.getRequestStatusColor(gasRefillModel.status?.value ?? 0)), + label: gasRefillModel.status?.name ?? "", + textColor: AColors.getRequestStatusTextColorByName(gasRefillModel.status.name), + backgroundColor: AColors.getRequestStatusColorByName(gasRefillModel.status.name), + ), 8.height, context.translation.gasRefillRequest.heading5(context), 8.height,