HttpResponse<T>.failure constructor
Implementation
HttpResponse.failure({String? errorMsg, String? errorCode}) {
error = BadRequestException(message: errorMsg, code: errorCode);
ok = false;
if(isHttpFailingModusOrDialog) {
DiaLogUtil.showAlertDialog(middleText: errorMsg ?? '');
}else{
Get.snackbar('提示', errorMsg ?? '',
colorText: Colors.white, backgroundColor: Colors.black87);
}
}