HttpResponse<T>.failureFromError constructor

HttpResponse<T>.failureFromError([
  1. HttpException? error
])

Implementation

HttpResponse.failureFromError([HttpException? error]) {
  this.error = error ?? UnknownException();
  this.ok = false;
  Get.snackbar('提示', error?.message ?? '',
      colorText: Colors.white, backgroundColor: Colors.black87);
}