WooCartItemImages.fromJson constructor

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

Implementation

WooCartItemImages.fromJson(Map<String, dynamic> json) {
  id = json['id'].toString();
  src = json['src'];
  thumbnail = json['thumbnail'];

  if (json['srcset'] is String) {
    srcset = bool.fromEnvironment(json['srcset']);
  } else {
    srcset = json['srcset'];
  }
  sizes = json['sizes'];
  name = json['name'];
  alt = json['alt'];
}