feat:dio client done

This commit is contained in:
jahongireshonqulov
2025-10-28 17:03:13 +05:00
parent c528f7a07e
commit 4c652c2b47
18 changed files with 336 additions and 3 deletions

View File

@@ -0,0 +1,32 @@
import 'package:dio/dio.dart';
class ServerException implements Exception {
final String errorMessage;
final String errorKey;
final num statusCode;
const ServerException({
required this.statusCode,
required this.errorMessage,
required this.errorKey,
});
@override
String toString() {
return 'ServerException(statusCode: $statusCode, errorMessage: $errorMessage, errorKey: $errorKey)';
}
}
class CustomDioException implements Exception {
final String errorMessage;
final DioExceptionType type;
final int? statusCode;
CustomDioException({required this.errorMessage, required this.type, this.statusCode});
}
class ParsingException implements Exception {
final String errorMessage;
const ParsingException({required this.errorMessage});
}