Customer.fromJson constructor
Customer.fromJson(
- dynamic json
Implementation
Customer.fromJson(dynamic json) {
customerId = json['customer_id'];
customerName = json['customer_name'];
email = json['email'];
phone = json['phone'];
createdAt = json['created_at'];
if (json['cards'] != null) {
cards = [];
json['cards'].forEach((v) {
cards?.add(Cards.fromJson(v));
});
}
}