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