Skip to content

Commit 88b8317

Browse files
PerondasPerondas
Perondas
authored and
Perondas
committed
Fixed all warnings prohibiting publishing
1 parent 3f5de67 commit 88b8317

File tree

5 files changed

+17
-18
lines changed

5 files changed

+17
-18
lines changed

lib/src/logger.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class AnsiColor {
130130

131131
String call(String msg) {
132132
if (color) {
133-
return '${this}$msg$ansiDefault';
133+
return '$this$msg$ansiDefault';
134134
} else {
135135
return msg;
136136
}

lib/src/rtc_session.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2701,14 +2701,14 @@ class RTCSession extends EventManager implements Owner {
27012701
* Correctly set the SDP direction attributes if the call is on local hold
27022702
*/
27032703
String? _mangleOffer(String? sdpInput) {
2704-
if (!_localHold! && !_remoteHold!) {
2704+
if (!_localHold && !_remoteHold) {
27052705
return sdpInput;
27062706
}
27072707

27082708
Map<String, dynamic> sdp = sdp_transform.parse(sdpInput!);
27092709

27102710
// Local hold.
2711-
if (_localHold! && !_remoteHold!) {
2711+
if (_localHold && !_remoteHold) {
27122712
logger.d('mangleOffer() | me on hold, mangling offer');
27132713
for (Map<String, dynamic> m in sdp['media']) {
27142714
if (holdMediaTypes.indexOf(m['type']) == -1) {
@@ -2724,7 +2724,7 @@ class RTCSession extends EventManager implements Owner {
27242724
}
27252725
}
27262726
// Local and remote hold.
2727-
else if (_localHold! && _remoteHold!) {
2727+
else if (_localHold && _remoteHold) {
27282728
logger.d('mangleOffer() | both on hold, mangling offer');
27292729
for (Map<String, dynamic> m in sdp['media']) {
27302730
if (holdMediaTypes.indexOf(m['type']) == -1) {
@@ -2734,7 +2734,7 @@ class RTCSession extends EventManager implements Owner {
27342734
}
27352735
}
27362736
// Remote hold.
2737-
else if (_remoteHold!) {
2737+
else if (_remoteHold) {
27382738
logger.d('mangleOffer() | remote on hold, mangling offer');
27392739
for (Map<String, dynamic> m in sdp['media']) {
27402740
if (holdMediaTypes.indexOf(m['type']) == -1) {
@@ -2756,16 +2756,16 @@ class RTCSession extends EventManager implements Owner {
27562756
void _setLocalMediaStatus() {
27572757
bool enableAudio = true, enableVideo = true;
27582758

2759-
if (_localHold! || _remoteHold!) {
2759+
if (_localHold || _remoteHold) {
27602760
enableAudio = false;
27612761
enableVideo = false;
27622762
}
27632763

2764-
if (_audioMuted!) {
2764+
if (_audioMuted) {
27652765
enableAudio = false;
27662766
}
27672767

2768-
if (_videoMuted!) {
2768+
if (_videoMuted) {
27692769
enableVideo = false;
27702770
}
27712771

lib/src/sip_ua_helper.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -371,15 +371,15 @@ class SIPUAHelper extends EventManager {
371371

372372
void _notifyTransportStateListeners(TransportState state) {
373373
// Copy to prevent concurrent modification exception
374-
var _listeners = _sipUaHelperListeners.toList();
374+
List<SipUaHelperListener> _listeners = _sipUaHelperListeners.toList();
375375
for (SipUaHelperListener listener in _listeners) {
376376
listener.transportStateChanged(state);
377377
}
378378
}
379379

380380
void _notifyRegistrationStateListeners(RegistrationState state) {
381381
// Copy to prevent concurrent modification exception
382-
var _listeners = _sipUaHelperListeners.toList();
382+
List<SipUaHelperListener> _listeners = _sipUaHelperListeners.toList();
383383
for (SipUaHelperListener listener in _listeners) {
384384
listener.registrationStateChanged(state);
385385
}
@@ -393,23 +393,23 @@ class SIPUAHelper extends EventManager {
393393
}
394394
call.state = state.state;
395395
// Copy to prevent concurrent modification exception
396-
var _listeners = _sipUaHelperListeners.toList();
396+
List<SipUaHelperListener> _listeners = _sipUaHelperListeners.toList();
397397
for (SipUaHelperListener listener in _listeners) {
398398
listener.callStateChanged(call, state);
399399
}
400400
}
401401

402402
void _notifyNewMessageListeners(SIPMessageRequest msg) {
403403
// Copy to prevent concurrent modification exception
404-
var _listeners = _sipUaHelperListeners.toList();
404+
List<SipUaHelperListener> _listeners = _sipUaHelperListeners.toList();
405405
for (SipUaHelperListener listener in _listeners) {
406406
listener.onNewMessage(msg);
407407
}
408408
}
409409

410410
void _notifyNotifyListeners(EventNotify event) {
411411
// Copy to prevent concurrent modification exception
412-
var _listeners = _sipUaHelperListeners.toList();
412+
List<SipUaHelperListener> _listeners = _sipUaHelperListeners.toList();
413413
for (SipUaHelperListener listener in _listeners) {
414414
listener.onNewNotify(Notify(request: event.request));
415415
}

lib/src/transports/websocket_interface.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import 'websocket_dart_impl.dart'
77
if (dart.library.js) 'websocket_web_impl.dart';
88

99
class WebSocketInterface implements Socket {
10-
final int _messageDelay;
11-
1210
WebSocketInterface(String url,
1311
{required int messageDelay, WebSocketSettings? webSocketSettings})
1412
: _messageDelay = messageDelay {
@@ -34,6 +32,7 @@ class WebSocketInterface implements Socket {
3432
}
3533
_webSocketSettings = webSocketSettings ?? WebSocketSettings();
3634
}
35+
final int _messageDelay;
3736

3837
String? _url;
3938
String? _sip_uri;

test/all_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void main() {
1717
for (Function func in DigestAuthentication.testFunctions) {
1818
func();
1919
}
20-
for (Function func in Websocket.testFunctions) {
21-
//func();
22-
}
20+
//for (Function _func in Websocket.testFunctions) {
21+
//func();
22+
//}
2323
}

0 commit comments

Comments
 (0)