ProductsModel.fromJson constructor

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

Implementation

ProductsModel.fromJson(Map<String, dynamic> json) {
  count = json['count'];
  next = json['next'];
  previous = json['previous'];
  page = Page.fromJson(json['page']);
  results =
      List.from(json['results']).map((e) => Results.fromJson(e)).toList();
}