class IncomeListModel { String code; String msg; List data; IncomeListModel({this.code, this.msg, this.data}); IncomeListModel.fromJson(Map json) { code = json['code']; msg = json['msg']; if (json['data'] != null) { data = []; json['data'].forEach((v) { data.add(new Data.fromJson(v)); }); } } Map toJson() { final Map data = new Map(); data['code'] = this.code; data['msg'] = this.msg; if (this.data != null) { data['data'] = this.data.map((v) => v.toJson()).toList(); } return data; } } class Data { int id; num amount; String title; String comment; num orderId; String orderTime; Data( {this.id, this.amount, this.title, this.comment, this.orderId, this.orderTime}); Data.fromJson(Map json) { id = json['id']; amount = json['amount']; title = json['title']; comment = json['comment']; orderId = json['orderId']; orderTime = json['orderTime']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['amount'] = this.amount; data['title'] = this.title; data['comment'] = this.comment; data['orderId'] = this.orderId; data['orderTime'] = this.orderTime; return data; } }