NewsModel.fromJson constructor

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

Implementation

factory NewsModel.fromJson(Map<String, dynamic> json) => NewsModel(
      statusCode: json["statusCode"],
      status: json["status"],
      message: json["message"],
      data: json["data"] == null
          ? []
          : List<NewsListData>.from(
              json["data"]!.map((x) => NewsListData.fromJson(x))),
    );