gpt4 book ai didi

how to implement firebase dynamic links in flutter app?(如何在扑翼APP中实现火基动态链接?)

转载 作者:bug小助手 更新时间:2023-10-24 17:54:53 25 4
gpt4 key购买 nike



I'm trying to create a firebase dynamic link in futter mobile app to share some notes. but when I click on URL generated it takes me to play store and shows no app found because app is not published yet. I'm new to flutter and firebase dynamic links, any help would be appreciated.

我正试图在Futter移动应用程序中创建一个Firebase动态链接来分享一些笔记。但当我点击生成的URL时,它会把我带到商店,并显示没有找到任何应用程序,因为应用程序还没有发布。我是新的扑翼和火基动态链接,任何帮助都将不胜感激。


this is my firebase registered link.

这是我的Firebase注册链接。


^https{0,1}:\/\/com\.sparkosol\.quixnote([\/#\?].*){0,1}$

this is my code

这是我的代码


import 'package:firebase_dynamic_links/firebase_dynamic_links.dart';
import 'package:share_plus/share_plus.dart';

class DynamicLinkProvide {
static final _dynamicLink = FirebaseDynamicLinks.instance;

///create the link
///
Future<String> createLink(String refCode) async {
try {
// com.sparkosol.quixnote
final url = "https://com.sparkosol.quixnote?ref=$refCode";
final parameters = DynamicLinkParameters(
link: Uri.parse(url),
uriPrefix: "https://quixnote.page.link/notes",
androidParameters: const AndroidParameters(
packageName: "com.sparkosol.quixnote",
minimumVersion: 0,
),
);
final link = await FirebaseDynamicLinks.instance;
final refLink= await link.buildLink(parameters);
// final refLink = await _dynamicLink.buildShortLink(parameters);
return refLink.toString();
} catch (_) {
rethrow;
}
}

/// init dynamic link
///
Future<void> initDynamicLink() async {
final instanceLink = await FirebaseDynamicLinks.instance.getInitialLink();
if (instanceLink != null) {
final refLink = instanceLink.link;

Share.share("this is the link ${refLink.queryParameters["ref"]}");
}
}
}


this is how i'm calling it

我是这么称呼它的


 DynamicLinkProvide().createLink("fjhj").then((value){
print("${value}");
Share.share(value);
});

this is what i'm getting
enter image description here

这就是我所得到的


更多回答
优秀答案推荐
更多回答

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com