From 595c47acbbe8089f764e377d86a236ee28eb693f Mon Sep 17 00:00:00 2001 From: "Aamir.Muhammad" Date: Wed, 15 Mar 2023 09:03:26 +0300 Subject: [PATCH] Changes --- .../itg/its_add_screen_video_image.dart | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) 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..eb08898 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,10 @@ class _ITGAdsScreenState extends State { @override void dispose() { - _controller.dispose(); + if (_controller != null) { + _controller.dispose(); + } + // player.stop(); // player.dispose(); super.dispose(); @@ -172,7 +175,35 @@ 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); + } + }, + ), + ], + ), ], ), );