From b9a3da1cbd7c44cee69e514f6fdbeb64c43b56e6 Mon Sep 17 00:00:00 2001 From: phuoc Date: Thu, 29 Aug 2024 16:52:05 +0700 Subject: [PATCH] remove tap to view when there is no handler Signed-off-by: phuoc --- lib/util/inapp_notifications.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/util/inapp_notifications.dart b/lib/util/inapp_notifications.dart index 6585d013d..43dc53267 100644 --- a/lib/util/inapp_notifications.dart +++ b/lib/util/inapp_notifications.dart @@ -47,10 +47,11 @@ Widget _inAppNotificationToast(BuildContext context, String body, String key, key: Key(key), notificationOpenedHandler: notificationOpenedHandler, addOnTextSpan: [ - TextSpan( - text: ' ${'tap_to_view'.tr()}', - style: Theme.of(context).textTheme.ppMori400FFYellow14, - ) + if (notificationOpenedHandler != null) + TextSpan( + text: ' ${'tap_to_view'.tr()}', + style: Theme.of(context).textTheme.ppMori400FFYellow14, + ) ], );