How to put different routes with same URL in deep linking with flutter

124 Views Asked by At

How should I configure the routes for deeplinking in flutter if the URL is same with different parameters for two different features.

For example: The URL I recived in mail for email verification is mywebsite.com/click/?token=abc1234 and the URL for forgot password is mywebsite.com/click/?token=xyz5678. So my route in the app would be emailVerificationRoute = "/click". How to differentiate these routes so that my app could recognize that this route is for this feature.

I tried using a boolean to check if any of the mails has been sent already. Then used an if else condition with this boolean. But its not efficient, once the user closes the app the state is gone and until the controllers are not initialized the bool passed is wrong.

0

There are 0 best solutions below