fromJson static method

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

Implementation

static FoundFileDownloads? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return FoundFileDownloads(
    totalCounts: DownloadedFileCounts.fromJson(
        json['total_counts'] as Map<String, dynamic>?)!,
    files: List<FileDownload>.from(((json['files'] as List<dynamic>?) ??
            <dynamic>[])
        .map((item) => FileDownload.fromJson(item as Map<String, dynamic>?))
        .toList()),
    nextOffset: (json['next_offset'] as String?) ?? '',
  );
}