fromJson static method

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

Implementation

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

  return DownloadedFileCounts(
    activeCount: (json['active_count'] as int?) ?? 0,
    pausedCount: (json['paused_count'] as int?) ?? 0,
    completedCount: (json['completed_count'] as int?) ?? 0,
  );
}