Location.fromJson constructor Null safety

Location.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Location.fromJson(Map<String, dynamic> json) => Location(
      id: json["id"],
      name: json["name"],
      type: json["type"],
      dimension: json["dimension"],
      residents: List<String>.from(json["residents"].map((x) => x)),
      url: json["url"],
      created: DateTime.parse(json["created"]),
    );