I am trying to generate forgot password dynamic link using flutter (dart), the following code is the function that I'm using
I am using firebase_dynamic_links: ^0.5.1 package
void forg(context) async {
if(User['Email'] != '' && User['Email'] != null) {
Firestore.instance.collection('customer').where('Email', isEqualTo: User['Email']).getDocuments().then((onValue) {
if(onValue.documents.length != 0) {
onValue.documents.forEach((doc) async {
DynamicLinkParameters parameters = new DynamicLinkParameters(
uriPrefix: 'https://<sudomain>.page.link/forgotPass' + doc.documentID,
link: Uri.parse('https://grihasti.com/forgot/' + doc.documentID),
androidParameters: AndroidParameters(
packageName: 'com.xyz.wxyz',
minimumVersion: 1
),
iosParameters: IosParameters(
bundleId: 'com.xy.wxyz',
minimumVersion: '1.0.0',
appStoreId: '962194608'
),
socialMetaTagParameters: SocialMetaTagParameters(
title: 'Grihasti app reset password',
description: 'Click on the link to reset password for tour account with ' + doc.data['Name'].toString()
)
);
final Uri forgetLink = await parameters.buildUrl();
await launch(forgetLink.toString());
});
}
else {
Scaffold.of(context).showSnackBar(SnackBar(
content: Container(
height: 15,
child: Row(
mainAxisAlignment: MainAxisAlignment
.spaceBetween,
children: <Widget>[
Text(
'User not found'
),
FlatButton(
child: Text(
'Register'
),
onPressed: () =>
Navigator.of(context).pushNamed(
'/register',
arguments: RegS(
pass, User['Email'])
),
)
],
),
),
duration: Duration(seconds: 2),
));
}
});
}
else {
Scaffold.of(context).showSnackBar(SnackBar(
content: Container(
height: 15,
child: Text(
'Enter email',
style: TextStyle(
color: Colors.red
),
),
),
duration: Duration(seconds: 2),
));
}
}
but I get a clean build and everything when using a browser to access the link I get this Even though I have my URL whitelist setup
the link does not appear on my firebase console, also if I make a link over there and try to use it, it's working fine