0

I want to host an Flutter Web App under https://www.someDomain.com/someFolder/otherFolder

and create a deeplink like that https://www.someDomain.com/someFolder/otherFolder/showProducts/1

that should also work for smartphones.

In android I define:

        <intent-filter android:autoVerify="true">
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="https" android:host="www.someDomain.com" android:path="/someFolder/otherFolder" />
        </intent-filter>

So the deeplink is working for the webapp and the smartphone - BUT I would have to define a GoRoute like that:

      GoRoute(
        path: "**someFolder/otherFolder/**showProducts/:productID",
        builder: _showProductsDL,
      ),

The problem is that a version of the WebApp could also be deployed under other subfolder structures like https://www.someDomain.com/ or https://www.someDomain.com/somewhereElse/V2/ or https://www.someDomain.com/somewhereElse/v3/

Is it somehow possible to handle all by defininig a GoRoute with the path "showProducts/:productID" and ignore the subfolders / remoe them from the path the GoRouter is working with?

derChris
  • 726
  • 8
  • 19

0 Answers0