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, + ), ), - ), - ); + ); + }); } } }