Peer.fromJson constructor

Peer.fromJson(
  1. JsonMap rawData
)

Implementation

factory Peer.fromJson(JsonMap rawData) => Peer(
      address: rawData['address'] as String,
      clientName: rawData['clientName'] as String,
      clientIsChoked: rawData['clientIsChoked'] as bool,
      clientIsInterested: rawData['clientIsInterested'] as bool,
      flagStr: rawData['flagStr'] as String,
      isDownloadingFrom: rawData['isDownloadingFrom'] as bool,
      isEncrypted: rawData['isEncrypted'] as bool,
      isIncoming: rawData['isIncoming'] as bool,
      isUploadingTo: rawData['isUploadingTo'] as bool,
      isUTP: rawData['isUTP'] as bool,
      peerIsChoked: rawData['peerIsChoked'] as bool,
      peerIsInterested: rawData['peerIsInterested'] as bool,
      port: rawData['port'] as num,
      progress: rawData['progress'] as num,
      rateToClient: rawData['rateToClient'] as num,
      rateToPeer: rawData['rateToPeer'] as num,
    );