feat(email): verify screen

This commit is contained in:
mso7nueh
2025-05-26 17:56:29 +03:00
parent 51d3c1ad2f
commit 67bf7b0510
12 changed files with 146 additions and 33 deletions

View File

@@ -183,7 +183,8 @@ class ProfileRepository {
}
Future<String> getPassKey(String phone) async {
return (jsonDecode((await profileService.getPassKey(json: '{"route_name": "user_detailz.change-phone-verify", "route_params": {"phone": "$phone"}}'))))['key_is']!;
return (jsonDecode(
(await profileService.getPassKey(json: '{"route_name": "user_detailz.change-phone-verify", "route_params": {"phone": "$phone"}}'))))['key_is']!;
}
Future<String> getMyPhone() async {
@@ -194,7 +195,12 @@ class ProfileRepository {
return await profileService.sendEmailCode();
}
Future<void> tryVerifyEmailByCode(String code) async {
return await profileService.tryVerifyEmailByCode(code: "{\"code\": \"$code\"}");
Future<bool> tryVerifyEmailByCode(String code) async {
try {
await profileService.tryVerifyEmailByCode(code: "{\"code\": \"$code\"}");
return true;
} catch (e) {
return false;
}
}
}