MoveModel.fromJson constructor
MoveModel.fromJson(
- Map<String, dynamic> json
)
Implementation
MoveModel.fromJson(Map<String, dynamic> json) {
if (json["id"] is int) this.id = json["id"];
if (json["title"] is String) this.title = json["title"];
if (json["slug"] is String) this.slug = json["slug"];
this.content = json["content"];
if (json["address"] is String) this.address = json["address"];
if (json["video"] is String) this.video = json["video"];
if (json["lat"] is double) this.lat = json["lat"];
if (json["lng"] is double) this.lng = json["lng"];
this.distance = json["distance"];
if (json["isFeatured"] is int) this.isFeatured = json["isFeatured"];
if (json["priceRange"] is int) this.priceRange = json["priceRange"];
if (json["reviewScore"] is int) this.reviewScore = json["reviewScore"];
this.logoUrl = json["logoUrl"];
this.qrCode = json["qrCode"];
if (json["image"] is String) this.image = json["image"];
if (json["bannerImage"] is String) this.bannerImage = json["bannerImage"];
if (json["gallery"] is List)
this.gallery =
json["gallery"] == null ? null : List<String>.from(json["gallery"]);
if (json["category"] is Map)
this.category = json["category"] == null
? null
: MoviCategory.fromJson(json["category"]);
}