ProductModel.fromJson constructor
ProductModel.fromJson(
- Map<String, dynamic> json
)
Implementation
ProductModel.fromJson(Map<String, dynamic> json) {
if (json["terminalId"] is int) this.terminalId = json["terminalId"];
if (json["id"] is int) this.id = json["id"];
if (json["label"] is String) this.label = json["label"];
if (json["description"] is String) this.description = json["description"];
if (json["productSerial"] is String)
this.productSerial = json["productSerial"];
if (json["purchasedAt"] is int) this.purchasedAt = json["purchasedAt"];
if (json["warrantyUntil"] is int)
this.warrantyUntil = json["warrantyUntil"];
if (json["productCat"] is String) this.productCat = json["productCat"];
if (json["categoryColor"] is String)
this.categoryColor = json["categoryColor"];
if (json["productRef"] is String) this.productRef = json["productRef"];
if (json["codeReference"] is String)
this.codeReference = json["codeReference"];
if (json["pictureUrl"] is String) this.pictureUrl = json["pictureUrl"];
if (json["statusId"] is int) this.statusId = json["statusId"];
if (json["statusLabel"] is String) this.statusLabel = json["statusLabel"];
if (json["statusColor"] is String) this.statusColor = json["statusColor"];
if (json["statusDisplay"] is int)
this.statusDisplay = json["statusDisplay"];
if (json["lat"] is double) this.lat = json["lat"];
if (json["lng"] is double) this.lng = json["lng"];
if (json["placeId"] is int) this.placeId = json["placeId"];
if (json["placeCity"] is String) this.placeCity = json["placeCity"];
if (json["placeLabel"] is String) this.placeLabel = json["placeLabel"];
if (json["placeLng"] is double) this.placeLng = json["placeLng"];
if (json["placeLat"] is double) this.placeLat = json["placeLat"];
if (json["placeCountry"] is String)
this.placeCountry = json["placeCountry"];
if (json["placeCountryCode"] is String)
this.placeCountryCode = json["placeCountryCode"];
if (json["placeZip"] is String) this.placeZip = json["placeZip"];
if (json["placeStreet1"] is String)
this.placeStreet1 = json["placeStreet1"];
if (json["placeStreet2"] is String)
this.placeStreet2 = json["placeStreet2"];
if (json["utcModifier"] is String) this.utcModifier = json["utcModifier"];
if (json["macAddress"] is String) this.macAddress = json["macAddress"];
if (json["moreInfos"] is String) this.moreInfos = json["moreInfos"];
if (json["hasOwner"] is int) this.hasOwner = json["hasOwner"];
}