Common.fromJson constructor

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

Implementation

Common.fromJson(Map<String, dynamic> json) {
  count = json['count'];
  next = json['next'];
  previous = json['previous'];
  if (json['results'] != null) {
    results =  <NamedAPIResource>[];
    json['results'].forEach((v) {
      results!.add( NamedAPIResource.fromJson(v));
    });
  }
}