ApiService class

Constructors

ApiService()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

dio → Dio
dio getter (used for testing)
no setter

Static Methods

call(String url, RequestType requestType, {Map<String, dynamic>? headers, Map<String, dynamic>? queryParameters, required dynamic onSuccess(Response response), dynamic onError(ApiException error)?, dynamic onReceiveProgress(int value, int progress)?, dynamic onSendProgress(int total, int progress)?, Function? onLoading, CancelToken? cancelToken, dynamic data}) Future<void>
perform safe api request
download({required String url, required String savePath, dynamic onError(ApiException error)?, dynamic onReceiveProgress(int value, int progress)?, required Function onSuccess}) Future<void>
download file