parseList static method

List<Article> parseList(
  1. dynamic list
)

Implementation

static List<Article> parseList(dynamic list) {
  if (list == null || list is! List || list.isEmpty) return [];
  return list.map((e) => Article.fromJson(e)).toList();
}