SelectedProductModel.fromJson constructor
Implementation
factory SelectedProductModel.fromJson(Map<String, dynamic> json) {
return SelectedProductModel(
productModel: ProductModel.fromJson(json['product']),
quantity: json['quantity'] ?? 0,
selectedOption: List.from(json['selectedOption'] ?? [])
.map((e) => SpecialOption.fromJson(e))
.toList(),
totalPrice:
json['totalPrice'] != null ? json['totalPrice'].toDouble() : 0.0,
);
}