Cover.fromJson constructor Null safety

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

Implementation

Cover.fromJson(Map<String, dynamic> json) {
  if (json['results'] != null) {
    results = <Result>[];
    json['results'].forEach((v) {
      results.add(Result.fromJson(v));
    });
  }
  limit = json['limit'] ?? 0;
  offset = json['offset'] ?? 0;
  total = json['total'] ?? 0;
}