2

When a user presses a "new message from Y" notification, I want to go into the chat page, but when the user goes back to the previous page, it should be the conversations page.

I've tried something like:

Get.offAllNamed(MainNavigationScreen.getRouteWithTabIndex(MainNavigationScreen.CONVERSATIONS_PAGE_INDEX));
Get.toNamed(ChatScreen.getRouteWithUserId(sender.facebookId));

but with this code, when MainNavigationScreen is at initState, the current route (Get.currentRoute) is actually "already" ChatScreen.getRouteWithUserId(sender.facebookId)!!

Why? And so how can I implement what I really meant with GetX?

yoni keren
  • 300
  • 2
  • 14

0 Answers0