BaseApi class abstract

Implementers

Constructors

BaseApi(String url, {HttpMethod httpMethod = HttpMethod.get})

Properties

formData ↔ FormData
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
httpMethod HttpMethod
final
intrtceptors List<Interceptor>
getter/setter pair
method String
no setter
params Map<String, dynamic>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
final

Methods

closeLoading() → void
handle(CallIf callIf, ValueChanged<BaseApi> call) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
request({bool showErrorMsg = true, String? loadingText, String contentType = "", Map<String, dynamic>? headers, bool showDefaultLoading = true, dynamic data, ResponseType? responseType, bool? nullParams, RequestEncoder? requestEncoder, DioStart? dioStart, bool? returnIsString, bool isFullUrl = false}) Future
isFullUrl - url传入的是否为完整的一个URL,如果为true,将忽略host
showLoading({String? loadingText}) → void
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

dio ↔ Dio?
getter/setter pair
host String
no getter

Static Methods

getDio() → Dio