admin管理员组文章数量:1356413
I need to implement 403 Forbidden page in web flutter application without redirecting to some /forbidden
path but leaving on the page which is forbidden. It it possible?
I need to implement 403 Forbidden page in web flutter application without redirecting to some /forbidden
path but leaving on the page which is forbidden. It it possible?
1 Answer
Reset to default 0On the root of the application add a stream listener.
From the redirect function of go router add a future callback for the forbidden page based on business logic.
In the future callback add an event to the stream sink. Add a delay before adding the event to the sink.
The listener can be used to display the Forbidden Dialog/ Widget.
Not the best approch. but will work. Redirecting to forbidden still is the best way
本文标签:
版权声明:本文标题:dart - How can I generate an 403 Forbidded error using go_router in flutter without redirecting to forbidden page itself? - Stac 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743956858a2568289.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论