auto_route_library
auto_route_library copied to clipboard
Single page instance
Hi,
is there any easy/known way to make sure that some specific screen
can be opened only once?
For example, consider next scenario:
- I have messenger app
- user starts the app and the
main screen
opened - user clicks on the chat with a
friend A
andchat screen
opened - user receive push notification from another friend and clicks on it
- this click on push notification triggers to open
chat screen
withfriend B
- this click on push notification triggers to open
Is there a way to close the previously opened chat screen
? Or maybe some setup for rules how and when to close previously opened screens.
Ideally, we should not care if this is the last pushed screen or not.
For example if from chat screen
user navigates to the friend profile screen
and than clicks on the notification with another chat.
Thank you 🙏