Map<String, dynamic> toJson() => { "id": id, "name": name, "totalProducts": totalProducts, "productList": List<dynamic>.from(productList.map((x) => x)), };