diff --git a/lib/extensions/widget_extensions.dart b/lib/extensions/widget_extensions.dart index 8261cf34..ff457b1d 100644 --- a/lib/extensions/widget_extensions.dart +++ b/lib/extensions/widget_extensions.dart @@ -83,7 +83,7 @@ extension WidgetExtensions on Widget { Widget toShimmer({bool isShow = true, double radius = 20, double? width, double? height, required BuildContext context}) => isShow ? Shimmer.fromColors( - baseColor: context.isDark ? AppColor.backgroundDark : const Color(0xffe8eff0), + baseColor: context.isDark ? AppColor.containerBorderDark : const Color(0xffe8eff0), highlightColor: AppColor.background(context), child: ClipRRect( borderRadius: BorderRadius.circular(radius), diff --git a/lib/new_views/swipe_module/swipe_history_view.dart b/lib/new_views/swipe_module/swipe_history_view.dart index bd834a70..c01458ad 100644 --- a/lib/new_views/swipe_module/swipe_history_view.dart +++ b/lib/new_views/swipe_module/swipe_history_view.dart @@ -10,6 +10,7 @@ import 'package:test_sa/new_views/app_style/app_color.dart'; import 'package:test_sa/new_views/common_widgets/app_filled_button.dart'; import 'package:test_sa/new_views/common_widgets/default_app_bar.dart'; import 'package:test_sa/views/widgets/date_and_time/date_picker.dart'; +import 'package:test_sa/views/widgets/item_views/info_text_widget.dart'; import 'package:test_sa/views/widgets/loaders/lazy_loading.dart'; import 'package:test_sa/views/widgets/loaders/no_data_found.dart'; @@ -169,17 +170,15 @@ class SwipeHistoryCard extends StatelessWidget { Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(swipeHistory.swipeTime!.toServiceRequestDetailsFormat, - textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral50)), + Text(swipeHistory.swipeTime!.toServiceRequestDetailsFormat, textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: AppColor.textStyleColor(context))), ], ), 8.height, - '${context.translation.swipeTypeName}: ${swipeHistory.swipeTypeName?.cleanupWhitespace.capitalizeFirstOfEach}'.bodyText(context), - '${context.translation.userName}: ${swipeHistory.userName}'.bodyText(context), - '${context.translation.siteName}: ${swipeHistory.siteName}'.bodyText(context), - '${context.translation.pointName}: ${swipeHistory.pointName}'.bodyText(context), - 8.height, + InfoTextWidget(label: context.translation.swipeTypeName, value: swipeHistory.swipeTypeName?.cleanupWhitespace.capitalizeFirstOfEach), + InfoTextWidget(label: context.translation.userName, value: swipeHistory.userName, showEmptyValue: true), + InfoTextWidget(label: context.translation.siteName, value: swipeHistory.siteName, showEmptyValue: true), + InfoTextWidget(label: context.translation.pointName, value: swipeHistory.pointName, showEmptyValue: true), ], - ).toShadowContainer(context, showShadow: showShadow); + ).toShadowContainer(context, padding: 16); } } diff --git a/lib/new_views/swipe_module/utils/swipe_general_utils.dart b/lib/new_views/swipe_module/utils/swipe_general_utils.dart index 122f14b9..3f8b2f61 100644 --- a/lib/new_views/swipe_module/utils/swipe_general_utils.dart +++ b/lib/new_views/swipe_module/utils/swipe_general_utils.dart @@ -117,13 +117,9 @@ class SwipeGeneralUtils { return Container( padding: const EdgeInsets.all(12), decoration: BoxDecoration( - color: isEnabled - ? context.isDark - ? AppColor.neutral60 - : Colors.white - : AppColor.background(context), + color: isEnabled ? AppColor.tabBarBackground(context) : AppColor.background(context), borderRadius: BorderRadius.circular(18), - border: Border.all(color: context.isDark ? AppColor.neutral60 : Colors.white70, width: 2), + border: Border.all(color: AppColor.borderColor(context), width: 2), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -632,7 +628,7 @@ class SwipeGeneralUtils { children: [ context.translation.markAttendance.heading4(context).custom(color: context.isDark ? AppColor.white50 : AppColor.white936), 8.height, - context.translation.selectMethodToMarkAttendance.bodyText2(context).custom(color: AppColor.neutral120), + context.translation.selectMethodToMarkAttendance.bodyText2(context).custom(color: AppColor.lightTextColor(context)), 12.height, GridView( padding: const EdgeInsets.all(0),