Blame view

lib/common/request/api_response/api_response_entity.dart 368 Bytes
056970d8   Key   feat: api
1
2
  import 'dart:convert';
  
dd3a2881   吴启风   fix:ios编译失败
3
  import 'api_response_entity.g.dart';
99b94d6c   吴启风   feat:首页增加信息弹窗
4
  
056970d8   Key   feat: api
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  
  class ApiResponse<T> {
    int? code;
    String? msg;
    T? data;
  
    ApiResponse();
  
    factory ApiResponse.fromJson(Map<String, dynamic> json) => $ApiResponseFromJson<T>(json);
  
    Map<String, dynamic> toJson() => $ApiResponseToJson(this);
  
    @override
    String toString() {
      return jsonEncode(this);
    }
  }