LCOV - code coverage report
Current view: top level - lib/src/voip/models - call_participant.dart (source / functions) Hit Total Coverage
Test: merged.info Lines: 5 15 33.3 %
Date: 2024-05-13 12:56:47 Functions: 0 0 -

          Line data    Source code
       1             : import 'package:matrix/matrix.dart';
       2             : 
       3             : class CallParticipant {
       4             :   final VoIP voip;
       5             :   final String userId;
       6             :   final String? deviceId;
       7             : 
       8           2 :   CallParticipant(
       9             :     this.voip, {
      10             :     required this.userId,
      11             :     this.deviceId,
      12             :   });
      13             : 
      14           0 :   bool get isLocal =>
      15           0 :       userId == voip.client.userID && deviceId == voip.client.deviceID;
      16             : 
      17           0 :   String get id {
      18           0 :     String pid = userId;
      19           0 :     if (deviceId != null) {
      20           0 :       pid += ':$deviceId';
      21             :     }
      22             :     return pid;
      23             :   }
      24             : 
      25           0 :   @override
      26             :   String toString() {
      27           0 :     return id;
      28             :   }
      29             : 
      30           2 :   @override
      31             :   bool operator ==(Object other) =>
      32             :       identical(this, other) ||
      33           2 :       other is CallParticipant &&
      34           6 :           userId == other.userId &&
      35           6 :           deviceId == other.deviceId;
      36             : 
      37           0 :   @override
      38           0 :   int get hashCode => userId.hashCode ^ deviceId.hashCode;
      39             : }

Generated by: LCOV version 1.14