LKGood.fromJson constructor

LKGood.fromJson(
  1. Map<String, dynamic> map
)

Implementation

factory LKGood.fromJson(Map<String, dynamic> map) {
  return LKGood(
      type: map['type'] ?? '',
      description: Map<String, dynamic>.from(map['description']),
      pictures: List<String>.from(map['pictures']),
      persons:
          List.from(map['persons']).map((j) => LKPerson.fromJson(j)).toList(),
      enterprises: List.from(map['enterprises'])
          .map((j) => LKEnterprise.fromJson(j))
          .toList());
}