checkNetwork method

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

Implementation

bool checkNetwork({bool showToast = true}) {
  if (hasNetWork == false && showToast) {
    Fluttertoast.showToast(msg: S.of().networkErrorTip);
    return false;
  }
  return true;
}