You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

47 lines
1.3 KiB

class Product {
String itemID;
String name;
String shopName;
String shopLocation;
String country;
String duration;
String adShort;
String adFull;
Product(
{this.itemID,
this.name,
this.shopName,
this.shopLocation,
this.country,
this.duration,
this.adShort,
this.adFull});
Product.fromJSON(Map<String, dynamic> json)
: itemID = json['productID'],
name = json['name'],
shopName = json['shopName'],
shopLocation = json['shopLocation'],
duration = json['duration'],
adShort = json['adShort'],
adFull = json['adFull'],
country = json['country'];
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = Map<String, dynamic>();
data['itemID'] = this.itemID;
data['name'] = this.name;
data['shopName'] = this.shopName;
data['shopLocation'] = this.shopLocation;
data['country'] = this.country;
data['duration'] = this.duration;
data['adShort'] = this.adShort;
data['adFull'] = this.adFull;
return data;
}
@override
String toString() {
return '{"itemID":"$itemID","name": "$name", "shopName": "$shopName","shopLocation": "$shopLocation","country":"$country","duration":"$duration","adFull":"$adFull","adShort":"$adShort"}';
}
}