ShippingOption.fromJson constructor

ShippingOption.fromJson(
  1. Map<String, dynamic> json
)

Converts a ShippingOption object to JSON object

Implementation

factory ShippingOption.fromJson(Map<String, dynamic> json) {
  return ShippingOption(
    id: json['id']!,
    title: json['title']!,
    prices: (json['prices'] as List<dynamic>)
        .map((e) => LabeledPrice.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}