HttpResponse<T>.failureFormResponse constructor

HttpResponse<T>.failureFormResponse({
  1. dynamic data,
})

Implementation

HttpResponse.failureFormResponse({dynamic data}) {
  error = BadResponseException(data);
  ok = false;
  if(isHttpFailingModusOrDialog) {
    DiaLogUtil.showAlertDialog(middleText: data ?? '');
  }else{
    Get.snackbar('提示', data ?? '',
        colorText: Colors.white, backgroundColor: Colors.black87);
  }
}