我想添加ofl,以便在桌面上打开链接时,链接将转到应用程序的Web版本
这是我的代码,我应该把它添加到哪里?
final DynamicLinkParameters parameters = DynamicLinkParameters(
// The Dynamic Link URI domain. You can view created URIs on your Firebase console
uriPrefix: uriPrefix,
// The deep Link passed to your application which you can use to affect change
link: Uri.parse(parsableLink),
// Android application details needed for opening correct app on device/Play Store
androidParameters: AndroidParameters(
packageName: androidPackageName, fallbackUrl: Uri.parse(webLink)),
// iOS application details needed for opening correct app on device/App Store
iosParameters: IOSParameters(
bundleId: iosPackageName, fallbackUrl: Uri.parse(webLink)),
//longDynamicLink: Uri.parse('$parsableLink&ofl=$webLink')
);
final ShortDynamicLink shortDynamicLink =
await dynamicLinks.buildShortLink(parameters);
print(shortDynamicLink);
return shortDynamicLink.shortUrl.toString();
1条答案
按热度按时间watbbzwu1#
好吧,我想我必须像这样添加longDynamicLink: