Location.fromShallowMap constructor

Location.fromShallowMap(
  1. Map<String, dynamic> map
)

Implementation

factory Location.fromShallowMap(Map<String, dynamic> map) {
  return Location(
    name: map["name"],
    owner: map["owner"],
    type: map["type"],
    zone: map["zone"],
    outsideDescription: map["outsideDescription"],
    buildingDescription: map["buildingDescription"],
    goods: map["goods"] != null
        ? (map["goods"] as List).map<Goods>((x) => Goods.fromMap(x)).toList()
        : null,
  );
}