From 952317b469f7cc02ffdde77346a5fd9b958c35a0 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Thu, 12 Jun 2025 16:26:38 +0800 Subject: [PATCH] Revert "build change" --- lib/common/request/api_response/api_response_entity.g.dart | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+), 0 deletions(-) create mode 100644 lib/common/request/api_response/api_response_entity.g.dart diff --git a/lib/common/request/api_response/api_response_entity.g.dart b/lib/common/request/api_response/api_response_entity.g.dart new file mode 100644 index 0000000..43cff1e --- /dev/null +++ b/lib/common/request/api_response/api_response_entity.g.dart @@ -0,0 +1,36 @@ +import 'package:flutter/foundation.dart'; + +import '../../../generated/json/base/json_convert_content.dart'; +import 'api_response_entity.dart'; + +ApiResponse $ApiResponseFromJson(Map json) { + final ApiResponse apiResponseEntity = ApiResponse(); + final int? code = jsonConvert.convert(json['code']); + if (code != null) { + apiResponseEntity.code = code; + } + final String? msg = jsonConvert.convert(json['msg']); + if (msg != null) { + apiResponseEntity.msg = msg; + } + String type = T.toString(); + T? data; + if (kDebugMode) { + print("ApiResponse T-type:$type, data-type:${json['data'].runtimeType}"); + } + if (json['data'] != null) { + data = JsonConvert.fromJsonAsT(json['data']); + } + if (data != null) { + apiResponseEntity.data = data; + } + return apiResponseEntity; +} + +Map $ApiResponseToJson(ApiResponse entity) { + final Map data = {}; + data['code'] = entity.code; + data['msg'] = entity.msg; + data['data'] = entity.data; + return data; +} -- libgit2 0.22.2