Achievement.fromJson constructor

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

get the model from the json

Implementation

factory Achievement.fromJson(Map<String, dynamic> json) {
  return Achievement(
    id: json["id"] ?? 0,
    name: json["name"] ?? "",
    description: json["description"] ?? "",
    image: json["image"] ?? "",
    percent: json["percent"] ?? "",
  );
}