network library

Mixins

NetWork

Functions

authInterceptor(dynamic request) FutureOr<Request>
请求鉴权
handleAlert(Request request) bool
handleErrorStatus(Response response) → void
handleRspAlert(Request request) bool
handleRspAlertStr(Request request) String
isConnected() Future<bool>
logInterceptor(dynamic request) FutureOr<Request>
日志拦截器
myAppBar({bool canPop = true, Color? backgroundColor, required String title, List<Widget>? actions, Widget? leading, bool? centerTitle, double? leadingWidth, required bool defaultFlexibleSpace, double? toolbarHeight, PreferredSizeWidget? bottom, Function? back}) PreferredSizeWidget
自定义AppBar
requestInterceptor(Request request) FutureOr<Request>
注册请求监听
responseInterceptor(Request request, Response response) FutureOr
注册回调监听、错误处理
searchAppBar({bool canPop = true, Color? backgroundColor, String? hint, dynamic onSubmit(String)?, FocusNode? focusNode, Widget? leading, bool? centerTitle, double? titleWidth, double? titleHeight, List<Widget>? actions, double? leadingWidth, double? toolbarHeight, bool? autoFocus, TextEditingController? textEditingController}) PreferredSizeWidget
搜索appbar