最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

flutter - Prevent already open route to open again with go_router - Stack Overflow

programmeradmin1浏览0评论

I use go_router in combination with flutter navigation api. Here are my routes:

  • home-route
  • objects-route
  • object-route

From home I would call Navigator.push() to get to objects and the context.push() to get to object.

I have no child routes yet, I know. It is not the point here, I think. I get push notification which should navigate to object-route. It works fine, but if object-route is already open, it opens it again. So when I click on back I get back to object-route.

Should I check the path in redirect to prevent duplicate screen or I am using go_router wrong?

I am using context.push() upon notification is tapped.

发布评论

评论列表(0)

  1. 暂无评论