diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index 84e0e45..6b4dca7 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -404,7 +404,8 @@ "stamp": "ختم", "addFavoriteList": "هل تريد اضافة {name} لقائمة المفضله", "feedbackUserExperience": "هذا للحصول على تعليقات حول تجربة المستخدم", - "rateUI": ".1 كيف تريد تقييم التطبيق", + "rateUI": "كيف تريد أن تقيم", + "rateUI2": "ما مدى رضائك عن هذا التطبيق", "submitSurvey": "ارسال الاستبيان", "typeHere": "اكتب هنا", "infoDetail": "تفاصيل المعلومات", diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index fc1a2be..3aa2705 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -404,7 +404,8 @@ "stamp": "Stamp", "addFavoriteList": "Do you want to add {name} in your favorite list", "feedbackUserExperience": "This is to get the feedback about the user experience", - "rateUI": "1. How would you rate this UI?", + "rateUI": "How would you like to rate", + "rateUI2": "How do you satisfied with this application", "submitSurvey": "Submit Survey", "typeHere": "Type here", "infoDetail": "Info Detail", 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 be16a89..61b2766 100644 --- a/lib/ui/landing/itg/its_add_screen_video_image.dart +++ b/lib/ui/landing/itg/its_add_screen_video_image.dart @@ -93,7 +93,7 @@ class _ITGAdsScreenState extends State { @override void dispose() { - _controller.dispose(); + if (_controller != null) _controller.dispose(); // player.stop(); // player.dispose(); super.dispose(); @@ -172,7 +172,28 @@ class _ITGAdsScreenState extends State { } }, ), - if (isImage) Image.file(imageFile), + if (isImage) + Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.file(imageFile), + 50.height, + Container(padding: const EdgeInsets.all(16), decoration: Utils.containerRadius(MyColors.white, 10), child: const Icon(Icons.thumb_up, color: MyColors.gradiantEndColor)).onPress( + () { + try { + DashboardApiClient().setAdvertisementViewed(masterID!, advertisementData!.advertisementId!).then((value) { + logger.d(value); + Navigator.pop(context); + }); + } catch (ex) { + logger.wtf(ex); + Utils.handleException(ex, context, null); + } + }, + ), + ], + ), ], ), ); diff --git a/lib/ui/landing/itg/survey_screen.dart b/lib/ui/landing/itg/survey_screen.dart index ec79d0f..6240934 100644 --- a/lib/ui/landing/itg/survey_screen.dart +++ b/lib/ui/landing/itg/survey_screen.dart @@ -72,7 +72,7 @@ class _SurveyScreenState extends State { ], ).paddingOnly(left: 22, right: 22, top: 12, bottom: 12).objectContainerView(disablePadding: true), 39.height, - LocaleKeys.rateUI.tr().toText16(), + LocaleKeys.rateUI2.tr().toText16(), 10.height, GridView( gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 5, crossAxisSpacing: 7, mainAxisSpacing: 7), @@ -134,7 +134,7 @@ class _SurveyScreenState extends State { void performAPI() async { Utils.showLoading(context); try { - ItgMainRes? res= await DashboardApiClient().submitItgForm( + ItgMainRes? res = await DashboardApiClient().submitItgForm( comment: reviewText, masterId: itgResponseData!.notificationMasterId ?? "", itgList: [ @@ -144,15 +144,12 @@ class _SurveyScreenState extends State { serviceId: itgResponseData!.serviceId ?? 0); Utils.hideLoading(context); - - - if(res!.mohemmItgResponseItem!.statusCode==200){ + if (res!.mohemmItgResponseItem!.statusCode == 200) { Utils.showToast("Survey has been submitted successfully"); Navigator.pop(context); - }else{ + } else { Utils.showToast(res.mohemmItgResponseItem!.message.toString()); } - } catch (ex) { Utils.hideLoading(context); Utils.handleException(ex, context, (msg) {