APICore class

Constructors

APICore()
factory

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

config APIConfig
no setter
instance APICore
no setter
pagingConfig APIPagingConfig
no setter

Static Methods

initialize({required APIConfig config, APIPagingConfig? pagingConfig}) → void
可以在任意地方调用, 调用之后所有的 APISession 都会默认使用这个配置 只初始化一次,后续使用 updateConfig 来更新配置
updateConfig({String? baseUrl, Duration? connectTimeout, String? contentType, bool? ensureNonNullHeadersFields, bool? ensureNonNullParametersFields, Parameters? extra, bool? followRedirects, HTTPHeader? headers, bool? isHandleErrors, bool? isToastErrors, ListFormat? listFormat, int? maxRedirects, HTTPMethod? method, bool? persistentConnection, bool? postBodyByDefault, BodyFormat? postBodyFormat, bool? postUseFormData, String? prefixPath, bool? preserveHeaderCase, Parameters? queryParameters, bool? receiveDataWhenStatusError, Duration? receiveTimeout, RequestEncoder? requestEncoder, ResponseDecoder? responseDecoder, ResponseType? responseType, Duration? sendTimeout, String? suffixPath, ValidateStatus? validateStatus, String? numberKey, int? pageNumber, int? pageSize, String? sizeKey}) → void