From f06426091b993b60af653b61be3102447f2f7b6b Mon Sep 17 00:00:00 2001 From: WaseemAbbasi22 Date: Thu, 27 Feb 2025 11:11:28 +0300 Subject: [PATCH] room null value issue fixed in recurrent task --- .../recurrent_wo/components/task_info_widget.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/views/pages/user/ppm/ppm_work_order/recurrent_wo/components/task_info_widget.dart b/lib/views/pages/user/ppm/ppm_work_order/recurrent_wo/components/task_info_widget.dart index ad99c375..ee5f5ef5 100644 --- a/lib/views/pages/user/ppm/ppm_work_order/recurrent_wo/components/task_info_widget.dart +++ b/lib/views/pages/user/ppm/ppm_work_order/recurrent_wo/components/task_info_widget.dart @@ -50,11 +50,11 @@ class RecurrentTaskInfoWidget extends StatelessWidget { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - buildingInfoWidget(label: context.translation.department, value: model!.department!.name!.cleanupWhitespace.capitalizeFirstOfEach, context: context), + buildingInfoWidget(label: context.translation.department, value: model!.department?.name?.cleanupWhitespace.capitalizeFirstOfEach, context: context), 8.height, - buildingInfoWidget(label: context.translation.floor, value: model!.floor!.name!.cleanupWhitespace.capitalizeFirstOfEach, context: context), + buildingInfoWidget(label: context.translation.floor, value: model!.floor?.name?.cleanupWhitespace.capitalizeFirstOfEach, context: context), 8.height, - buildingInfoWidget(label: context.translation.room, value: model!.room!.name!.cleanupWhitespace.capitalizeFirstOfEach, context: context), + buildingInfoWidget(label: context.translation.room, value: model!.room?.name?.cleanupWhitespace.capitalizeFirstOfEach, context: context), 8.height, _timerWidget(context, model!.totalWorkingHours!) ], @@ -106,7 +106,7 @@ class RecurrentTaskInfoWidget extends StatelessWidget { } } -Widget buildingInfoWidget({required String label, required String value, required BuildContext context}) { +Widget buildingInfoWidget({required String label, required String ?value, required BuildContext context}) { return Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, @@ -118,7 +118,7 @@ Widget buildingInfoWidget({required String label, required String value, require ), 3.height, Text( - value, + value??'', style: AppTextStyles.bodyText2.copyWith(color: AppColor.black10), ) ],