utils/src/network_util library

Classes

Config
NetworkUtil
Result
A Result.
Session

Enums

BaseURLType
URL环境
ErrorType

Properties

baseURLChangedCallback VoidCallback?
BaseURL变化回调
getter/setter pair
kBaseURLType BaseURLType
上线环境
no setter
kEmptyList String
列表无数据
getter/setter pair
kFirstPage int
分页时第一页的起始页值
getter/setter pair
kLimitPage int
分页时每页数量
getter/setter pair
kPageKey String
页码数
getter/setter pair
kPageSizeKey String
每页数量
getter/setter pair
kReleaseBaseURL String
生产环境
getter/setter pair
kTestBaseURL String
测试环境
getter/setter pair

Functions

get({String? baseUrl, String path = '', Map<String, dynamic>? queryParameters, int? connectTimeout, bool validResult = true, bool autoLoading = false}) Future<Result>
发送请求并解析远程服务器返回的result对应的实体类型
initSelectedBaseURLType() Future<String?>
post({String? baseUrl, String path = '', dynamic data, int? connectTimeout, bool validResult = true, bool autoLoading = false}) Future<Result>
发送请求并解析远程服务器返回的result对应的实体类型
request({String? baseUrl, String path = '', dynamic data, Map<String, dynamic>? queryParameters, Options? options, int? connectTimeout, bool validResult = true, bool autoLoading = false}) Future<Result>
发送请求并解析远程服务器返回的result对应的实体类型
showSelectBaseURLTypeAlert({BuildContext? context}) Future<bool?>
弹出切换环境菜单

Typedefs

SessionInterceptorSendHandler = dynamic Function(RequestOptions options)
SessionInterceptorSuccessHandler = dynamic Function(Result result)