class Discount { String id; String code; String customerId; String customerName; String status; double amount; <<<<<<< HEAD Discount( {this.id, this.code, this.customer, this.amount, this.status, this.weight, this.discountRate}); ======= Discount({ this.id, this.code, this.customerId, this.customerName, this.amount, this.status, }); Map toMap() { return { 'id': id, 'code': code, "customer_id": customerId, "customer_name": customerName, "amount": amount, }; } factory Discount.fromMap(Map map, String id) { return Discount( id: id, code: map['code'], customerId: map['customer_id'], customerName: map['customer_name'], amount: map['amount'], status: map['status'], ); } >>>>>>> upstream/master }