Pokemon.fromJson constructor

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

Implementation

factory Pokemon.fromJson(Map<String, dynamic> json) => Pokemon(
    count: json["count"],
    next: json["next"],
    previous: json["previous"],
    pokeDetails: List<PokeDetail>.from(json["results"].map((x) => PokeDetail.fromJson(x))),
);