HzyNormalResponse.fail constructor

HzyNormalResponse.fail({
  1. required dynamic data,
  2. String? errorMsg = '网络请求失败',
  3. int? errorCode = 404,
  4. Map<String, dynamic>? response,
})

Implementation

HzyNormalResponse.fail({
  required this.data,
  String? errorMsg = '网络请求失败',
  int? errorCode = 404,
  Map<String, dynamic>? response,
}) {
  msg = errorMsg ?? "网络请求失败";
  error = HzyNormalExceeption(msg, errorCode);
  ok = false;
}