Constructors
-
BaseAPIService({Dio? dio, BaseOptions? options, List<
Interceptor> ? interceptors, CancelToken? cancelToken, bool isLogEnabled = true}) -
BaseAPIService.init({Dio? dio, List<
Interceptor> ? interceptors, CancelToken? cancelToken, bool isLogEnabled = true}) -
BaseAPIService.mock(Dio dio, {List<
Interceptor> ? interceptors, CancelToken? cancelToken, bool isLogEnabled = true})
Properties
- cancelToken → CancelToken?
-
final
- dio ↔ Dio
-
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
handleJSONArrayResponseError(
Response response) → Error -
handleJSONObjectResponseError(
Response response) → Error -
handleRequestError(
Error error, BaseAPIInput input) → APIResponse< JsonData> -
handleResponseError(
Response response) → Error -
handleResponseUnknownError(
Response response) → Error -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
preprocess(
BaseAPIInput input) → Future< BaseAPIInput> -
process(
Response response) → APIResponse< JsonData> -
requestJSONArray<
T> (BaseAPIInput input, {required T mapper(JsonObject jsonObject), NetworkRequestOptions options = const NetworkRequestOptions()}) → Future< List< T> > -
requestJSONObject<
T> (BaseAPIInput input, {required T mapper(JsonObject jsonObject), NetworkRequestOptions options = const NetworkRequestOptions()}) → Future< T> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited