APIBase class

APIBase class contains attributes, properties and methods for base implementation of the http requests like GET, POST.

Constructors

APIBase()

Properties

dio → Dio
final
hashCode int
The hash code for this object.
no setterinherited
password String
password will be used for Basic Auth implementations in the APIs.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

get(String apiKey, BuildContext context, {String? apiUrl, dynamic bodyData, Options? options}) Future<BaseResponseModel>
get method will be used to call GET method in all the methods which is making use of GET methods. apiUrl will be used to specify the particular url that will be used for the API call. options will be the GET request Options given by the Dio package.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post(String apiKey, BuildContext context, {String? apiUrl, dynamic bodyData, Options? options}) Future<BaseResponseModel>
post method will be used to call POST method in all the methods which is making use of POST methods. apiUrl will be used to specify the particular url that will be used for the API call. bodyData will be used to set the body data for the POST method if any. options will be the POST request Options given by the Dio package.
toString() String
A string representation of this object.
inherited

Operators

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