fromJson static method

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

Implementation

static Product fromJson(Map<String, dynamic> json) {
  return Product(
      name: json['name'] as String,
      sku: json['sku'] as String,
      price: json['price'] as double,
      quantity: json['quantity'] as int,
      variant: json['variant'] as String,
      category: json['category'] as String,
      brand: json['brand'] as String,
      position: json['position'] as int,
      couponCode: json['couponCode'] as String,
      attributes: json['attributes'] as Map<String, String?>);
}