Home > Software engineering >  Avoid deep link calls onGenerateRoute in Flutter app?
Avoid deep link calls onGenerateRoute in Flutter app?

Time:12-31

I'm trying to handle deeplinking in my Flutter app with uni_links package.

Is there a way to avoid onGenerateRoute is called by the launch deep linking? I have my own routing logic and I just need to get the deeplink string (I already do) and nothing else, I don't need to be routed anywhere.

CodePudding user response:

For android,

in AndroidManifest.xml inside <activity> tag, please add

<meta-data android:name="flutter_deeplinking_enabled" android:value="false" />

More info: https://docs.flutter.dev/development/ui/navigation/deep-linking#enable-deep-linking-on-android

For iOS Inside Info.plist, add

<key>FlutterDeepLinkingEnabled</key> <true/>

More info: https://docs.flutter.dev/development/ui/navigation/deep-linking#enable-deep-linking-on-ios

  • Related