generateDynamicLink method

Future<String> generateDynamicLink (
  1. String email
)

Implementation

Future<String> generateDynamicLink(String email) async {
  var bytes = utf8.encode("$email-${DateTime.now().millisecondsSinceEpoch}");
  var digest = sha1.convert(bytes);
  String link = "$url?token=$digest";
  SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
  sharedPreferences.setString("email", email);

  return link;
}