checkIsOnline static method

bool checkIsOnline({
  1. bool showToast = true,
})

检查是否在线

Implementation

static bool checkIsOnline({bool showToast=true}) {
  if(pocChangeNotifier.isOnline){
    return true;
  }else{
    if(showToast){
      playText(getTranslation("IntercomIsOffline"), true);
      ToastUtils.instance.show(getTranslation("IntercomIsOffline"));
    }
    return false;
  }
  }