Commit 607982c38e553f84cd9fd5c8a3ddfaf20407a381

Authored by xiaoyu
1 parent 0481d22d

build change

lib/common/request/api_response/api_response_entity.g.dart deleted
1 -import 'package:flutter/foundation.dart';  
2 -  
3 -import '../../../generated/json/base/json_convert_content.dart';  
4 -import 'api_response_entity.dart';  
5 -  
6 -ApiResponse<T> $ApiResponseFromJson<T>(Map<String, dynamic> json) {  
7 - final ApiResponse<T> apiResponseEntity = ApiResponse<T>();  
8 - final int? code = jsonConvert.convert<int>(json['code']);  
9 - if (code != null) {  
10 - apiResponseEntity.code = code;  
11 - }  
12 - final String? msg = jsonConvert.convert<String>(json['msg']);  
13 - if (msg != null) {  
14 - apiResponseEntity.msg = msg;  
15 - }  
16 - String type = T.toString();  
17 - T? data;  
18 - if (kDebugMode) {  
19 - print("ApiResponse<T> T-type:$type, data-type:${json['data'].runtimeType}");  
20 - }  
21 - if (json['data'] != null) {  
22 - data = JsonConvert.fromJsonAsT(json['data']);  
23 - }  
24 - if (data != null) {  
25 - apiResponseEntity.data = data;  
26 - }  
27 - return apiResponseEntity;  
28 -}  
29 -  
30 -Map<String, dynamic> $ApiResponseToJson(ApiResponse entity) {  
31 - final Map<String, dynamic> data = <String, dynamic>{};  
32 - data['code'] = entity.code;  
33 - data['msg'] = entity.msg;  
34 - data['data'] = entity.data;  
35 - return data;  
36 -}