feat : captcha widget.dart

This commit is contained in:
2025-05-14 15:01:03 +03:30
parent a132b21b18
commit 3a017b5956
10 changed files with 57 additions and 305 deletions

View File

@@ -34,17 +34,18 @@ class AuthRepositoryImpl implements AuthRepository {
@override
Future<CaptchaResponseModel?> captcha() async {
final response = await safeCall<DioResponse<CaptchaResponseModel>>(
final response = await safeCall(
call:
() async => await _httpClient.post<CaptchaResponseModel>(
'$_BASE_URL/login/',
'captcha/',
headers: {'Content-Type': 'application/json'},
fromJson: CaptchaResponseModel.fromJson
),
onSuccess: (response) {
iLog(response);
},
onError: (error, trace) {
throw Exception('Error during sign in: $error');
throw Exception('Error during captcha : $error');
},
);