mfaCheck static method
check if phone number or email address can be used for MFA
Implementation
static Future<bool> mfaCheck(String? phone, String? email) async {
Map map = {};
if (phone != null) {
map.putIfAbsent('phone', () => phone);
}
if (email != null) {
map.putIfAbsent('email', () => email);
}
final Result result =
await post('/api/v2/applications/mfa/check', jsonEncode(map));
if (result.code == 200) {
return result.data["data"];
}
return false;
}