From ab1aa33ff3db863a8a612b1f432a726c58ccc563 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 7 Jun 2023 10:07:26 +0300 Subject: [PATCH] notifications update --- lib/classes/notifications.dart | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/classes/notifications.dart b/lib/classes/notifications.dart index e29b29c..47d4acd 100644 --- a/lib/classes/notifications.dart +++ b/lib/classes/notifications.dart @@ -131,13 +131,15 @@ class AppNotifications { notification.videoURL = message.data["VideoUrl"]; } - Navigator.of(context).push( - MaterialPageRoute( - builder: (BuildContext context) => NotificationsDetailsPage( - notification: notification, + Future.delayed(Duration(seconds: 5), () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context) => NotificationsDetailsPage( + notification: notification, + ), ), - ), - ); + ); + }); } void _handleOpenApp(RemoteMessage message) { @@ -155,13 +157,15 @@ class AppNotifications { notification.videoURL = message.data["VideoUrl"]; } - Navigator.of(context).push( - MaterialPageRoute( - builder: (BuildContext context) => NotificationsDetailsPage( - notification: notification, + Future.delayed(Duration(seconds: 5), () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (BuildContext context) => NotificationsDetailsPage( + notification: notification, + ), ), - ), - ); + ); + }); } } }