ListEntity<T>.fromJson constructor

ListEntity<T>.fromJson(
  1. Map<String, dynamic> json,
  2. List<T> results
)

Implementation

factory ListEntity.fromJson(
  Map<String, dynamic> json,
  List<T> results,
) =>
    ListEntity(
      nextUrl: json['next'],
      previousUrl: json['previous'],
      limit: json['per_page'],
      total: json['total'],
      totals: json['totals'] != null
          ? ListEntityTotals(
              removed: json['totals']['removed'],
              stored: json['totals']['stored'],
              unstored: json['totals']['unstored'],
            )
          : null,
      results: results,
    );