HttpResponse<T>.failureFromError constructor
HttpResponse<T>.failureFromError ([
- HttpException? error
Implementation
HttpResponse.failureFromError([HttpException? error]) {
error = error ?? UnknownException();
ok = false;
if(isHttpFailingModusOrDialog) {
DiaLogUtil.showAlertDialog(middleText: error.message ?? '');
}else{
Get.snackbar('提示', error.message ?? '',
colorText: Colors.white, backgroundColor: Colors.black87);
}
}