Gas refill status color in details screen

design_3.0_demo_module
zaid_daoud 2 years ago
parent 95b8351ede
commit 8800cabf32

@ -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/all_requests_and_count_model.dart';
import 'package:test_sa/models/new_models/gas_refill_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/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/pages/user/gas_refill/gas_refill_details.dart';
import 'package:test_sa/views/widgets/requests/request_status.dart'; import 'package:test_sa/views/widgets/requests/request_status.dart';
@ -31,11 +30,16 @@ class GasRefillItemView extends StatelessWidget {
label: request.priority, label: request.priority,
// id: , // id: ,
textColor: AColors.getRequestStatusTextColorByName(request.priority), textColor: AColors.getRequestStatusTextColorByName(request.priority),
backgroundColor: AColors.getRequestStatusColorByName(request.priority)), backgroundColor: AColors.getRequestStatusColorByName(request.priority),
),
8.width, 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, 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, 8.height,

@ -99,8 +99,9 @@ class _GasRefillDetailsPageState extends State<GasRefillDetailsPage> {
// 8.width, // 8.width,
StatusLabel( StatusLabel(
label: gasRefillModel.status?.name ?? "", label: gasRefillModel.status?.name ?? "",
textColor: AColors.getRequestStatusTextColor(gasRefillModel.status?.value ?? 0), textColor: AColors.getRequestStatusTextColorByName(gasRefillModel.status.name),
backgroundColor: AColors.getRequestStatusColor(gasRefillModel.status?.value ?? 0)), backgroundColor: AColors.getRequestStatusColorByName(gasRefillModel.status.name),
),
8.height, 8.height,
context.translation.gasRefillRequest.heading5(context), context.translation.gasRefillRequest.heading5(context),
8.height, 8.height,

Loading…
Cancel
Save