LCOV - code coverage report
Current view: top level - lib/src/voip/models - call_participant.dart (source / functions) Hit Total Coverage
Test: merged.info Lines: 13 15 86.7 %
Date: 2024-07-12 20:20:16 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           2 :   bool get isLocal =>
      15          10 :       userId == voip.client.userID && deviceId == voip.client.deviceID;
      16             : 
      17           2 :   String get id {
      18           2 :     String pid = userId;
      19           2 :     if (deviceId != null) {
      20           6 :       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           2 :   @override
      38          10 :   int get hashCode => userId.hashCode ^ deviceId.hashCode;
      39             : }

Generated by: LCOV version 1.14