copy static method

PeersState copy(
  1. PeersState old, {
  2. Map<String, Peer>? peers,
  3. Map<String, Peer>? shareScreenPeer,
})

Implementation

static PeersState copy(
  PeersState old, {
  Map<String, Peer>? peers,
  Map<String, Peer>? shareScreenPeer,
}) {
  return PeersState(
    peers: peers ?? old.peers,
    shareScreenPeer: shareScreenPeer ?? old.shareScreenPeer,
  );
}