bug 734 fixed.

design_3.0_latest
Sikander Saleem 9 months ago
parent 15023ea99d
commit f6b4b77aed

@ -50,11 +50,11 @@ class RecurrentTaskInfoWidget extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ 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, 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, 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, 8.height,
_timerWidget(context, model!.totalWorkingHours!) _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( return Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -118,18 +118,10 @@ Widget buildingInfoWidget({required String label, required String value, require
), ),
3.height, 3.height,
Text( Text(
value, value??'',
style: AppTextStyles.bodyText2.copyWith(color: AppColor.black10), style: AppTextStyles.bodyText2.copyWith(color: AppColor.black10),
) )
], ],
).toShadowContainer(context, backgroundColor: AppColor.neutral100, borderRadius: 10, paddingObject: EdgeInsets.all(12.toScreenHeight), showShadow: false); ).toShadowContainer(context, backgroundColor: AppColor.neutral100, borderRadius: 10, paddingObject: EdgeInsets.all(12.toScreenHeight), showShadow: false);
} }
class DummyModel {
RequestsDetails? request;
Ppm? ppm;
TimerModel? timerModel = TimerModel();
double totalWorkingHours = 2;
DummyModel(this.request, this.ppm, this.timerModel, this.totalWorkingHours);
}

Loading…
Cancel
Save