one_request library
This library exports the following packages:
dio_request.dart
: contains the implementation of theDioRequest
class.error.dart
: contains the implementation of theError
class.types.dart
: contains the implementation of various types used in the library.utils.dart
: contains utility functions used in the library. To use this library, simply calloneRequest
and you're good to go.
Classes
- CustomExceptionHandlers
- LoadingStuff
- A utility class for displaying loading indicators using EasyLoading.
- oneRequest
Extensions
- ParseContentType on ContentType
- An extension on ContentType that provides a value getter to return the corresponding MIME type string for the content type.
- ParseRequestType on RequestType
- Extension method to parse RequestType to a String value.
- ParseResponseType on ResponseType
-
An extension on ResponseType enum to convert it to
dio.ResponseType
.
Exceptions / Errors
- ApiNotRespondingException
- Exception thrown when the API does not respond.
- AppException
- An exception class for handling application-specific errors.
- BadRequestException
- Exception thrown for 400 Bad Request HTTP error. Exception thrown when there is an error processing an API request due to a bad request.
- FetchDataException
- Exception thrown when there is an error fetching data from an API.
- NotFoundException
- Exception thrown when the requested page is not found.
- UnAuthorizedException
- Exception thrown when the API request is unauthorized.