DownloadProgressEvent.fromJson constructor

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

Implementation

factory DownloadProgressEvent.fromJson(Map<String, dynamic> json) {
  return DownloadProgressEvent(
    guid: json['guid'] as String,
    totalBytes: json['totalBytes'] as num,
    receivedBytes: json['receivedBytes'] as num,
    state: DownloadProgressEventState.fromJson(json['state'] as String),
  );
}