BaseApi<T> constructor
BaseApi<T> (
- dynamic path, {
- dynamic param,
- Options? opt,
- String method = 'POST',
- Map<
String, dynamic> ? queryParameters, - bool isDebug = true,
- CancelToken? cancelToken,
- TransformJson<
T> ? serializer, - bool showLoading = true,
- bool dismissLoading = true,
- bool showToast = true,
- bool encrypt = false,
- bool cache = false,
- bool showLog = true,
Implementation
BaseApi(
this.path, {
this.param,
this.opt,
this.method = 'POST',
this.queryParameters,
this.isDebug = true,
this.cancelToken,
this.serializer,
this.showLoading = true,
this.dismissLoading = true,
this.showToast = true,
this.encrypt = false,
this.cache = false,
this.showLog = true,
}) {
if (this.opt == null) {
this.opt = Options(method: method, extra: {"BaseApi": this});
} else {
this.opt = this.opt!.copyWith(extra: {"BaseApi": this});
this.opt?.method ??= method;
}
}