ProServiceModel.fromJson constructor
ProServiceModel.fromJson(
- Map<String, dynamic> json
)
Implementation
ProServiceModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
utcModifier = json['utcModifier'];
serviceLabel = json['serviceLabel'] ?? '';
infosUrl = json['infosUrl'] ?? '';
ticketImageUrl = json['ticketImageUrl'] ?? '';
ticketOptionalMessage = json['ticketOptionalMessage'] ?? '';
actualDistance = json['actualDistance'];
price = json['price'] ?? 0.0;
indicativePrice = json['indicativePrice'] ?? 0.0;
currency = json['currency'] ?? '';
nextTime = json['nextTime'] ?? 0;
averageTime = json['averageTime'] ?? 0;
serviceInfos = json['serviceInfos'] ?? '';
serviceName = json['serviceName'] ?? '';
serviceId = json['serviceId'] ?? json['id'] ?? 0;
maxDelayCancel = json['maxDelayCancel'] ?? 0;
serviceTypeId = json['serviceTypeId'] ?? 0;
visibleInOowoo = json['visibleInOowoo'] ?? 0;
serviceThumbnail = json['serviceThumbnail'] ?? '/thumbnails/default.png';
requiredPayment = json['requiredPayment'] ?? 0;
requiredUserLocation = json['requiredUserLocation'] ?? 0;
requiredConfirmation = json['requiredConfirmation'] ?? 0;
placeInfo = PlaceModel.fromJson(json['placeInfo'] ?? {});
subCats = (json['subcat'] ?? [])
.map<SubCatModel>((e) => SubCatModel.fromJson(e))
.toList();
if (json['proInfo'] != null) proInfo = ProsModel.fromJson(json['proInfo']);
}