1

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 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.