viewRefresh method

Future<void> viewRefresh({
  1. dynamic params,
  2. bool notifier = true,
  3. bool busy = true,
  4. bool rootRefresh = false,
})
inherited

首次进入页面,主动调用页面刷新如果开启根布局不刷新设置ViewConfig.noRoot rootRefresh 需要根布局刷新 设置 true

Implementation

Future<void> viewRefresh({
  dynamic params,
  bool notifier = true,
  bool busy = true,
  bool rootRefresh = false,
}) async {
  if (rootRefresh) _activeGlobalRefresh = rootRefresh;

  if (busy) setBusy(true);

  bool result = false;
  result = await _request(param: params);
  if (rootRefresh && busy) _activeGlobalRefresh = true;
  _notifyIntercept = !notifier;
//    LogUtil.printLog("notifier : $notifier _notifyIntercept:$_notifyIntercept");
  if (!result) {
    setEmpty();
  } else {
    ///改变页面状态为非加载中
    setBusy(false);
  }
}