class TicketListResponse { List? ticket; int? error; String? message; TicketListResponse({this.ticket, this.error, this.message}); TicketListResponse.fromJson(Map json) { if (json['ticket'] != null) { ticket = []; json['ticket'].forEach((v) { ticket!.add(new Ticket.fromJson(v)); }); } error = json['error']; message = json['message']; } Map toJson() { final Map data = new Map(); if (this.ticket != null) { data['ticket'] = this.ticket!.map((v) => v.toJson()).toList(); } data['error'] = this.error; data['message'] = this.message; return data; } } class Ticket { String? tid; String? datetime; String? status; String? subject; Ticket({this.tid, this.datetime, this.status, this.subject}); Ticket.fromJson(Map json) { tid = json['tid']; datetime = json['datetime']; status = json['status']; subject = json['subject']; } Map toJson() { final Map data = new Map(); data['tid'] = this.tid; data['datetime'] = this.datetime; data['status'] = this.status; data['subject'] = this.subject; return data; } }