toJson method

Map<String, dynamic> toJson()

Creates a ShippingOption object from JSON object

Implementation

Map<String, dynamic> toJson() {
  return {
    'id': id,
    'title': title,
    'prices': prices.map((e) => e.toJson()).toList(),
  }..removeWhere(_nullFilter);
}