In my Flutter app I have implemented dynamic linking, I am sending the link with an id parameter and when the app receives it it navigates to the detailed screen with given id. It works all fine in Android, however on iOS long dynamic link is working as expected but when I send short link it gives me this and only opens the app, the handleDynamicLink function not triggered.
FLTFirebaseDynamicLinks: The url has not been supplied with the dynamic link.Please try opening your app with the long dynamic link to see if that works
So I am sending a WhatsApp message with created link and long link is not the thing that I want to send.
My dynamic link initializing code
void dynamicLinkInit() async {
final PendingDynamicLinkData? initialLink = await FirebaseDynamicLinks.instance.getInitialLink();
if (initialLink != null) {
handleDynamicLink(initialLink);
}
FirebaseDynamicLinks.instance.onLink.listen((PendingDynamicLinkData dynamicLink) async {
handleDynamicLink(dynamicLink);
}).onError((e) => l.w(e));
}
void handleDynamicLink(PendingDynamicLinkData dynamicLink) {
final Uri uri = dynamicLink.link;
l.w(uri);
final queryParams = uri.queryParameters;
if (queryParams.isNotEmpty && queryParams['id'] != null) {
String id = queryParams["id"]!;
l.w(id);
Get.to(() => RequestDetail(id: id));
}
}
I also added the link to Associated Domains and URL Types part.
Do you have any idea why the link is working when it is long but not when it is short?