TorrentAdded.fromJson constructor

TorrentAdded.fromJson(
  1. JsonMap rawData
)

Implementation

factory TorrentAdded.fromJson(JsonMap rawData) {
  return TorrentAdded(
    id: TorrentId(
        id: (rawData[TorrentGetArgument.id.argName] as num).toInt(),
        hashStr: rawData[TorrentGetArgument.hashString.argName] as String),
    name: rawData[TorrentGetArgument.name.argName] as String,
  );
}