sendEmailVerifyCode method
Implementation
Future<bool> sendEmailVerifyCode(String url) async {
try {
final res = await http.post(
Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json',
},
).catchError((e) {
if (kDebugMode) {
print("verifyCode failed: $e \n $url");
}
});
if (res.statusCode == 200) {
return true;
}
} catch (e) {
if (kDebugMode) {
print('error email code $e');
}
}
return false;
}