diff --git a/lib/ui/landing/itg/its_add_screen_video_image.dart b/lib/ui/landing/itg/its_add_screen_video_image.dart index 8c4d6ac..89d1b9e 100644 --- a/lib/ui/landing/itg/its_add_screen_video_image.dart +++ b/lib/ui/landing/itg/its_add_screen_video_image.dart @@ -241,7 +241,7 @@ class _ITGAdsScreenState extends State { // Build end date text Widget _buildEndDateText({bool isLargeText = false}) { String label = _getLocalizedText("تاريخ الانتهاء: ", "End Date: "); - String fullText = label + advertisementPayload!.deadline!; + String fullText = label + advertisementPayload!.deadline ?? ""; return isLargeText ? fullText.toText16(color: MyColors.darkTextColor) : fullText.toText14(color: MyColors.darkTextColor); } @@ -335,7 +335,7 @@ class _ITGAdsScreenState extends State { if (advertisementData != null) { checkFileType(); if (isTextURL) { - if (deadlineTimerController == null) { + if (advertisementPayload?.deadline != null && deadlineTimerController == null) { initDeadlineTimer(); } } else { @@ -561,7 +561,13 @@ class _ITGAdsScreenState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, - children: [_buildAdvertisementContent(), 24.height, _buildDeadlineSection(), 24.height, _buildActionButtons()], + children: [ + _buildAdvertisementContent(), + 24.height, + if (advertisementPayload != null && advertisementPayload!.deadline != null) _buildDeadlineSection(), + if (advertisementPayload != null && advertisementPayload!.deadline != null) 24.height, + _buildActionButtons(), + ], ), ), ],