resultSuccessFail function
nullPass = true data 为null 返回true
Implementation
bool resultSuccessFail(BaseModel data, {String? text, bool nullPass = false}) {
if (BaseDio().baseDioOptions.successCode.contains(data.code) &&
(nullPass || data.data != null)) {
if (text != null) showToast(text);
return true;
} else {
if (!BaseDio().baseDioOptions.hideMsg.contains(data.msg)) {
showToast(data.msg);
}
return false;
}
}