auto_route_library icon indicating copy to clipboard operation
auto_route_library copied to clipboard

Single page instance

Open pro100svitlo opened this issue 1 year ago • 0 comments

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 and chat screen opened
  • user receive push notification from another friend and clicks on it
    • this click on push notification triggers to open chat screen with friend B

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 🙏

pro100svitlo avatar Jan 24 '24 16:01 pro100svitlo