feat : captcha widget.dart
This commit is contained in:
@@ -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');
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user