Firebase动态链接无法创建短网址

时间:2019-12-08 10:55:22

标签: firebase flutter firebase-dynamic-links

代码:

void _createLink() async {
  final DynamicLinkParameters parameters = DynamicLinkParameters(
    uriPrefix: 'https://example.page.link',
    link: Uri.parse('https://www.example.com'),
    androidParameters: AndroidParameters(packageName: 'com.example.packageid', minimumVersion: 1),
  );

  final Uri dynamicUrl = await parameters.buildUrl();
  print("$dynamicUrl"); // prints on console
  final ShortDynamicLink shortDynamicLink = await parameters.buildShortLink(); // never finishes
  final Uri shortUrl = shortDynamicLink.shortUrl;
  print("$shortUrl"); // never prints
}

问题:

buildShortLink()永远不会完成,它将永远存在。我不确定自己在做什么错。

0 个答案:

没有答案