ResNews.fromJson constructor

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

Implementation

ResNews.fromJson(Map<String, dynamic> json) {
  if (json['news'] != null) {
    news = <News>[];
    json['news'].forEach((v) {
      news!.add(News.fromJson(v));
    });
  }
  total = json['total'];
  perPage = json['per_page'];
  currentPage = json['current_page'];
  nextPageUrl = json['next_page_url'];
  previousPageUrl = json['previous_page_url'];
}