diff --git a/lib/src/logger.dart b/lib/src/logger.dart index 43af3092..a1a107c6 100644 --- a/lib/src/logger.dart +++ b/lib/src/logger.dart @@ -130,7 +130,7 @@ class AnsiColor { String call(String msg) { if (color) { - return '${this}$msg$ansiDefault'; + return '$this$msg$ansiDefault'; } else { return msg; } diff --git a/lib/src/rtc_session.dart b/lib/src/rtc_session.dart index 05a48a7d..09de6c9f 100644 --- a/lib/src/rtc_session.dart +++ b/lib/src/rtc_session.dart @@ -2701,14 +2701,14 @@ class RTCSession extends EventManager implements Owner { * Correctly set the SDP direction attributes if the call is on local hold */ String? _mangleOffer(String? sdpInput) { - if (!_localHold! && !_remoteHold!) { + if (!_localHold && !_remoteHold) { return sdpInput; } Map sdp = sdp_transform.parse(sdpInput!); // Local hold. - if (_localHold! && !_remoteHold!) { + if (_localHold && !_remoteHold) { logger.d('mangleOffer() | me on hold, mangling offer'); for (Map m in sdp['media']) { if (holdMediaTypes.indexOf(m['type']) == -1) { @@ -2724,7 +2724,7 @@ class RTCSession extends EventManager implements Owner { } } // Local and remote hold. - else if (_localHold! && _remoteHold!) { + else if (_localHold && _remoteHold) { logger.d('mangleOffer() | both on hold, mangling offer'); for (Map m in sdp['media']) { if (holdMediaTypes.indexOf(m['type']) == -1) { @@ -2734,7 +2734,7 @@ class RTCSession extends EventManager implements Owner { } } // Remote hold. - else if (_remoteHold!) { + else if (_remoteHold) { logger.d('mangleOffer() | remote on hold, mangling offer'); for (Map m in sdp['media']) { if (holdMediaTypes.indexOf(m['type']) == -1) { @@ -2756,16 +2756,16 @@ class RTCSession extends EventManager implements Owner { void _setLocalMediaStatus() { bool enableAudio = true, enableVideo = true; - if (_localHold! || _remoteHold!) { + if (_localHold || _remoteHold) { enableAudio = false; enableVideo = false; } - if (_audioMuted!) { + if (_audioMuted) { enableAudio = false; } - if (_videoMuted!) { + if (_videoMuted) { enableVideo = false; } diff --git a/lib/src/sip_ua_helper.dart b/lib/src/sip_ua_helper.dart index d4856d0e..4403939c 100644 --- a/lib/src/sip_ua_helper.dart +++ b/lib/src/sip_ua_helper.dart @@ -371,7 +371,7 @@ class SIPUAHelper extends EventManager { void _notifyTransportStateListeners(TransportState state) { // Copy to prevent concurrent modification exception - var _listeners = _sipUaHelperListeners.toList(); + List _listeners = _sipUaHelperListeners.toList(); for (SipUaHelperListener listener in _listeners) { listener.transportStateChanged(state); } @@ -379,7 +379,7 @@ class SIPUAHelper extends EventManager { void _notifyRegistrationStateListeners(RegistrationState state) { // Copy to prevent concurrent modification exception - var _listeners = _sipUaHelperListeners.toList(); + List _listeners = _sipUaHelperListeners.toList(); for (SipUaHelperListener listener in _listeners) { listener.registrationStateChanged(state); } @@ -393,7 +393,7 @@ class SIPUAHelper extends EventManager { } call.state = state.state; // Copy to prevent concurrent modification exception - var _listeners = _sipUaHelperListeners.toList(); + List _listeners = _sipUaHelperListeners.toList(); for (SipUaHelperListener listener in _listeners) { listener.callStateChanged(call, state); } @@ -401,7 +401,7 @@ class SIPUAHelper extends EventManager { void _notifyNewMessageListeners(SIPMessageRequest msg) { // Copy to prevent concurrent modification exception - var _listeners = _sipUaHelperListeners.toList(); + List _listeners = _sipUaHelperListeners.toList(); for (SipUaHelperListener listener in _listeners) { listener.onNewMessage(msg); } @@ -409,7 +409,7 @@ class SIPUAHelper extends EventManager { void _notifyNotifyListeners(EventNotify event) { // Copy to prevent concurrent modification exception - var _listeners = _sipUaHelperListeners.toList(); + List _listeners = _sipUaHelperListeners.toList(); for (SipUaHelperListener listener in _listeners) { listener.onNewNotify(Notify(request: event.request)); } diff --git a/lib/src/transports/websocket_interface.dart b/lib/src/transports/websocket_interface.dart index 99e2af77..36651612 100644 --- a/lib/src/transports/websocket_interface.dart +++ b/lib/src/transports/websocket_interface.dart @@ -7,8 +7,6 @@ import 'websocket_dart_impl.dart' if (dart.library.js) 'websocket_web_impl.dart'; class WebSocketInterface implements Socket { - final int _messageDelay; - WebSocketInterface(String url, {required int messageDelay, WebSocketSettings? webSocketSettings}) : _messageDelay = messageDelay { @@ -34,6 +32,7 @@ class WebSocketInterface implements Socket { } _webSocketSettings = webSocketSettings ?? WebSocketSettings(); } + final int _messageDelay; String? _url; String? _sip_uri; diff --git a/test/all_test.dart b/test/all_test.dart index 20d39099..7667228e 100644 --- a/test/all_test.dart +++ b/test/all_test.dart @@ -17,7 +17,7 @@ void main() { for (Function func in DigestAuthentication.testFunctions) { func(); } - for (Function func in Websocket.testFunctions) { - //func(); - } + //for (Function _func in Websocket.testFunctions) { + //func(); + //} }