Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changes/fix-pub-score-static-analysis
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patch type="fixed" "Fix wildcard variable lint warnings to improve pub.dev score"
1 change: 0 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ include: package:lints/recommended.yaml
analyzer:
errors:
constant_identifier_names: ignore
no_wildcard_variable_uses: ignore
use_super_parameters: ignore
avoid_print: ignore
deprecated_member_use_from_same_package: ignore
Expand Down
4 changes: 2 additions & 2 deletions lib/src/participant/local.dart
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,8 @@ class LocalParticipant extends Participant<LocalTrackPublication> {
await room.engine.publisher?.pc.removeTrack(simulcastTrack.sender!);
});
}
} catch (_) {
logger.warning('[$objectId] rtc.removeTrack() did throw ${_}');
} catch (e) {
logger.warning('[$objectId] rtc.removeTrack() did throw $e');
}

// doesn't make sense to negotiate if already disposed
Expand Down
4 changes: 2 additions & 2 deletions lib/src/support/websocket/io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ class LiveKitWebSocketIO extends LiveKitWebSocket {

try {
_ws.add(data);
} catch (_) {
logger.fine('[$objectId] send did throw ${_}');
} catch (e) {
logger.fine('[$objectId] send did throw $e');
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/src/support/websocket/web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ class LiveKitWebSocketWeb extends LiveKitWebSocket {
Map<String, String>? headers, // ignore: unused_element_parameter
]) {
_ws.binaryType = 'arraybuffer';
_messageSubscription = _ws.onMessage.listen((_) {
_messageSubscription = _ws.onMessage.listen((event) {
if (isDisposed) {
logger.warning('$objectId already disposed, ignoring received data.');
return;
}
final dynamic data =
_.data.instanceOfString('ArrayBuffer') ? (_.data as JSArrayBuffer).toDart.asUint8List() : _.data;
event.data.instanceOfString('ArrayBuffer') ? (event.data as JSArrayBuffer).toDart.asUint8List() : event.data;
options?.onData?.call(data);
});
_closeSubscription = _ws.onClose.listen((_) async {
Expand Down
8 changes: 4 additions & 4 deletions lib/src/track/track.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ abstract class Track extends DisposableChangeNotifier with EventsEmittable<Track
if (_active) {
mediaStreamTrack.enabled = true;
}
} catch (_) {
logger.warning('[$objectId] set rtc.mediaStreamTrack.enabled did throw ${_}');
} catch (e) {
logger.warning('[$objectId] set rtc.mediaStreamTrack.enabled did throw $e');
}
}

Expand All @@ -163,8 +163,8 @@ abstract class Track extends DisposableChangeNotifier with EventsEmittable<Track
if (_active) {
mediaStreamTrack.enabled = false;
}
} catch (_) {
logger.warning('[$objectId] set rtc.mediaStreamTrack.enabled did throw ${_}');
} catch (e) {
logger.warning('[$objectId] set rtc.mediaStreamTrack.enabled did throw $e');
}
}

Expand Down