class GoodsDetailsImgModel {
  List<String> image_detail_list;
  String title;
  String title_color;
  String provider;
  String good_id;
  String icon;

  GoodsDetailsImgModel({
    this.image_detail_list,
    this.title,
    this.title_color,
    this.provider,
    this.good_id,
    this.icon
  });

  factory GoodsDetailsImgModel.fromJson(Map<String, dynamic> json) {
    return GoodsDetailsImgModel(
      image_detail_list: json['image_detail_list'] != null ? new List<String>.from(json['image_detail_list']) : null,
      title: json['title'],
      title_color: json['title_color'],
      provider: json['provider'],
      good_id: json['good_id'],
      icon: json['icon']
    );
  }

  GoodsDetailsImgModel copyWith(List<String> newImgs){
    return GoodsDetailsImgModel(
      image_detail_list: newImgs,
      title: title,
      title_color: title_color,
      provider: provider,
      good_id: good_id,
      icon: icon,
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['title'] = this.title;
    data['title_color'] = this.title_color;
    if (this.image_detail_list != null) {
      data['image_detail_list'] = this.image_detail_list;
    }
    data['provider'] = this.provider;
    data['good_id'] = this.good_id;
    data['icon'] = this.icon;
    return data;
  }
}
