WooCart.fromJson constructor

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

Implementation

WooCart.fromJson(Map<String, dynamic> json) {
  currency = json['currency'];
  itemCount = json['item_count'];
  if (json['items'] != null) {
    items = <WooCartItems>[];
    json['items'].forEach((v) {
      items!.add(new WooCartItems.fromJson(v));
    });
  }
  needsShipping = json['needs_shipping'];
  totalPrice = json['total_price'].toString();
  totalWeight = json['total_weight'];
}