ProductImage.fromJson constructor
ProductImage.fromJson(
- Map<String, dynamic> json
)
Implementation
ProductImage.fromJson(Map<String, dynamic> json) {
id = json['id'];
productId = json['product_id'];
position = json['position'];
createdAt =
json['created_at'] != null ? DateTime.parse(json['created_at']) : null;
updatedAt =
json['updated_at'] != null ? DateTime.parse(json['updated_at']) : null;
alt = json['alt'];
width = json['width'];
height = json['height'];
src = json['src'];
variantIds = json['variant_ids'].cast<int>();
adminGraphqlApiId = json['admin_graphql_api_id'];
}