WooCartItems.fromJson constructor

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

Implementation

WooCartItems.fromJson(Map<String, dynamic> json) {
  key = json['key'];
  id = json['id'];
  quantity = json['quantity'];
  name = json['name'];
  sku = json['sku'];
  permalink = json['permalink'];
  if (json['images'] != null) {
    images = <WooCartImages>[];
    json['images'].forEach((v) {
      images!.add(new WooCartImages.fromJson(v));
    });
  }
  price = json['price'];
  linePrice = json['line_price'];
  variation = json['variation'].cast<String>();
}