UDormJson.fromMap constructor
UDormJson.fromMap(
- Map<String, dynamic> json
)
Implementation
factory UDormJson.fromMap(Map<String, dynamic> json) => UDormJson(
detail1: json["detail1"],
detail2: json["detail2"],
description: json["description"],
policies: json["policies"],
highlights: json["highlights"] == null ? <String>[] : List<String>.from((json["highlights"] as List<dynamic>).map((dynamic e) => e.toString())),
rules: json["rules"] == null ? <String>[] : List<String>.from((json["rules"] as List<dynamic>).map((dynamic e) => e.toString())),
requiredDocuments: json["requiredDocuments"] == null ? <String>[] : List<String>.from((json["requiredDocuments"] as List<dynamic>).map((dynamic e) => e.toString())),
nearbyUniversity: json["nearbyUniversity"],
universityWalkMinutes: json["universityWalkMinutes"] == null ? null : (json["universityWalkMinutes"] as num).toInt(),
visitingHours: json["visitingHours"],
curfewTime: json["curfewTime"],
minimumStayMonths: json["minimumStayMonths"] == null ? null : (json["minimumStayMonths"] as num).toInt(),
howToGetThere: json["howToGetThere"],
nearby: json["nearby"] == null ? <UPlaceNearby>[] : List<UPlaceNearby>.from((json["nearby"] as List<dynamic>).map((dynamic e) => UPlaceNearby.fromMap(e))),
faqs: json["faqs"] == null ? <UPlaceFaq>[] : List<UPlaceFaq>.from((json["faqs"] as List<dynamic>).map((dynamic e) => UPlaceFaq.fromMap(e))),
website: json["website"],
whatsapp: json["whatsapp"],
instagram: json["instagram"],
telegram: json["telegram"],
latitude: json["latitude"] == null ? null : (json["latitude"] as num).toDouble(),
longitude: json["longitude"] == null ? null : (json["longitude"] as num).toDouble(),
);