class Product { Product({ this.id, this.quantity, this.description, this.price, this.name, this.ratingAverage,}); Product.fromJson(dynamic json) { id = json['id']; quantity = json['quantity']; description = json['description']; price = json['price']; name = json['name']; ratingAverage = json['ratingAverage']; } int? id; int? quantity; String? description; double? price; String? name; double? ratingAverage; Map toJson() { final map = {}; map['id'] = id; map['quantity'] = quantity; map['description'] = description; map['price'] = price; map['name'] = name; map['ratingAverage'] = ratingAverage; return map; } }