From 9afe7e7ec69b6914b6c8a1e75b2fdd7ed6376603 Mon Sep 17 00:00:00 2001 From: nextwo <1234> Date: Sun, 5 Mar 2023 12:16:54 +0300 Subject: [PATCH] null safety --- .../device_transfer_details.dart | 8 ++--- .../device_transfer_info_section.dart | 30 +++++++++---------- .../device_trancfer/device_transfer_item.dart | 4 +-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lib/views/pages/device_transfer/device_transfer_details.dart b/lib/views/pages/device_transfer/device_transfer_details.dart index 20353f59..aa2a707c 100644 --- a/lib/views/pages/device_transfer/device_transfer_details.dart +++ b/lib/views/pages/device_transfer/device_transfer_details.dart @@ -90,12 +90,12 @@ class _DeviceTransferDetailsState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ RequestInfoRow( - title: _subtitle?.title??"", - info: widget.model.title??"", + title: _subtitle!.title, + info: widget.model.title, ), RequestInfoRow( - title: _subtitle?.device??"", - info: widget.model.device?.serialNumber??"", + title: _subtitle?.device, + info: widget.model.device?.serialNumber, ), const SizedBox(height:8), Row( diff --git a/lib/views/widgets/device_trancfer/device_transfer_info_section.dart b/lib/views/widgets/device_trancfer/device_transfer_info_section.dart index 58fac4b5..5297b878 100644 --- a/lib/views/widgets/device_trancfer/device_transfer_info_section.dart +++ b/lib/views/widgets/device_trancfer/device_transfer_info_section.dart @@ -18,42 +18,42 @@ class DeviceTransferInfoSection extends StatelessWidget { return Column( children: [ RequestInfoRow( - title: subtitle?.hospital??"", - info: info.client?.name??"", + title: subtitle?.hospital, + info: info.client?.name, ), RequestInfoRow( - title: subtitle?.unite??"", - info: info.department?.name??"", + title: subtitle?.unite, + info: info.department?.name, ), RequestInfoRow( - title: subtitle?.engineerName??"", - info: info.name??"", + title: subtitle?.engineerName, + info: info.name, ), RequestInfoRow( - title: subtitle?.workingHours??"", - info: info.workingHours??"", + title: subtitle?.workingHours, + info: info.workingHours, ), RequestInfoRow( - title: subtitle?.travelingHours??"", - info: info.travelingHours??"", + title: subtitle?.travelingHours, + info: info.travelingHours, ), RequestInfoRow( title: "Comment", - info: info.comment??"", + info: info.comment, ), RequestInfoRow( title: "Signature", - info: (info.signature?.isEmpty??false) != false - ? subtitle?.noDateFound??"" : "", + info: (info.signature?.isEmpty) != false + ? subtitle?.noDateFound : "", contentWidget: (info.signature?.isEmpty??false) != false ? Container() : ImageLoader( url: info.signature??"", ), ), RequestInfoRow( - title: subtitle?.status??"", + title: subtitle?.status, infoWidget: StatusLabel( - label: info.status?.label??"", + label: info.status!.label, color: AColors.getGasStatusColor(info.status?.id??0) ), ), diff --git a/lib/views/widgets/device_trancfer/device_transfer_item.dart b/lib/views/widgets/device_trancfer/device_transfer_item.dart index 6e8d9403..ad0a4ffd 100644 --- a/lib/views/widgets/device_trancfer/device_transfer_item.dart +++ b/lib/views/widgets/device_trancfer/device_transfer_item.dart @@ -74,7 +74,7 @@ class DeviceTransferItem extends StatelessWidget { ), StatusLabel( color: AColors.getRequestStatusColor(item.sender?.status?.id??0), - label: item.sender?.status?.label??"", + label: item.sender!.status!.label, ) ], @@ -113,7 +113,7 @@ class DeviceTransferItem extends StatelessWidget { ), StatusLabel( color: AColors.getRequestStatusColor(item.receiver?.status?.id??0), - label: item.receiver?.status?.label??"", + label: item.receiver!.status!.label, ) ],