class BillProductResponse { List? bp; int? error; String? message; BillProductResponse({this.bp, this.error, this.message}); BillProductResponse.fromJson(Map json) { if (json['bp'] != null) { bp = []; json['bp'].forEach((v) { bp!.add(new Bp.fromJson(v)); }); } error = json['error']; message = json['message']; } Map toJson() { final Map data = new Map(); if (this.bp != null) { data['bp'] = this.bp!.map((v) => v.toJson()).toList(); } data['error'] = this.error; data['message'] = this.message; return data; } } class Bp { String? pname; String? qty; String? totalAmount; Bp({this.pname, this.qty, this.totalAmount}); Bp.fromJson(Map json) { pname = json['pname']; qty = json['qty']; totalAmount = json['total_amount']; } Map toJson() { final Map data = new Map(); data['pname'] = this.pname; data['qty'] = this.qty; data['total_amount'] = this.totalAmount; return data; } }