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.
this is my firebase registered link.
^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);
});
