upsertParticipant method Null safety

Participants upsertParticipant(
  1. Participant updatedParticipant
)

Implementation

Participants upsertParticipant(Participant updatedParticipant) => copyWith(
      local: updatedParticipant.info.isLocal ? updatedParticipant : local,
      remote: updatedParticipant.info.isLocal
          ? remote
          : Map.unmodifiable({...remote, updatedParticipant.id: updatedParticipant}),
      all: Map.unmodifiable({...all, updatedParticipant.id: updatedParticipant}),
    );