I am using declarative routing package such as go_router in Flutter Web, and trying to achieve what pushAndRemoveUntil can do as it is really helpful in many scenarios.
I tried to achieve this with all possible ways but none of the thing worked out for me.