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?

Share Improve this question asked Mar 31 at 9:30 BambinoUABambinoUA 7,1905 gold badges41 silver badges61 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

On 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

本文标签: