refresh method

void refresh(
  1. BuildContext context
)

刷新数据

Implementation

void refresh(BuildContext context) {
  //网络异常时显示失败视图并结束请求
  NetworkManager.instance.isConnected().then((netStatus) {
    if (netStatus ?? true) {
      refreshController?.isAutoTriggerLoad = true;
      onInitData(context, _arguments);
    } else {
      refreshController?.finishRefresh(success: true, noMore: false);
    }
  });
}