flutter_branch_sdk
flutter_branch_sdk copied to clipboard
Issue in Web, when used along side of any third party routing package
I am using QlevarRouter as a routing package to support nested navigations with navigator 2.0 support. Combining it the branch sdk works fine in mobile devices but there is some problem with web version i.e., Lets say i have a deeplink which will redirect to my domain xyz.com/something
. Clicking on the deeplink is taking me to xyz.com/?_branch_match_id=someRandomId&utm_medium=someThing&_branch_referrer=someRandomBigString
. And my router catching that link & trying to look for that route under my app routes & redirecting to PageNotFound (which is obvious because a route with that link won't present in my app routes). So i can't able to take the user to a particular deeply nested page on web.
I am not sure about other routing packages but as per my knowledge i think this issue will happen in every routing package, because all routers do the same ie., take the url appearing in the browers url address & redirect user to the page that matches the url path defined in their app routes.
About the url: xyz.com/?_branch_match_id=someRandomId&utm_medium=someThing&_branch_referrer=someRandomBigString.
It's not a problem. It's how the Branch SDK for Javascript and consequently for Flutter Web works.
I don't know how QlevarRouter works, but it will be necessary to handle this route in the code.
But the problem here is Branch is not catching the url in initSession
, so I can't able to handle it via code
I am facing the same issue in android app as well; I'm using onGenerateRoute and it's redirecting to 404 page, but I'm able handle redirect in initSession due to which double redirect is happening.
Closed due to inactivity. If necessary open again.