Item.fromJson constructor

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

Implementation

factory Item.fromJson(Map<String, dynamic> json) => Item(
      id: json["id"],
      name: json["name"],
      abbreviation: json["abbreviation"],
      description: json["description"],
      active: json["active"],
      createdAt: DateTime.parse(json["created_at"]),
      updatedAt: DateTime.parse(json["updated_at"]),
    );