Skip to content

Remove the LiveKitSettings object since we have that in aira_call (FE-81)#181

Merged
ming-chu merged 3 commits into
mainfrom
feature/remove-the-unused-livekitsetting-obj
Oct 7, 2025
Merged

Remove the LiveKitSettings object since we have that in aira_call (FE-81)#181
ming-chu merged 3 commits into
mainfrom
feature/remove-the-unused-livekitsetting-obj

Conversation

@ming-chu

@ming-chu ming-chu commented Oct 7, 2025

Copy link
Copy Markdown
Contributor

Remove the duplicated object and parsing logic since we already have the object to represent the LiveKitSetting in aira_call.

@ming-chu ming-chu requested a review from Copilot October 7, 2025 22:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR eliminates code duplication by removing the LiveKitSettings object and its associated classes from the livekit.dart file, leveraging existing LiveKitSetting objects from the aira_call package instead.

  • Removed the settings field and constructor parameter from the LiveKit class
  • Added a null check for _rawMap in the toMap() method to return early if already populated
  • Deleted all LiveKitSettings related classes and their nested setting classes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread lib/src/livekit.dart
}) : _rawMap = rawMap;

Map<String, dynamic> toMap() {
if (_rawMap.isNotEmpty) return _rawMap;

Copilot AI Oct 7, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The early return based on _rawMap.isNotEmpty changes the behavior of toMap(). Previously, it always returned a structured map with 'wsUrl', 'token', and 'settings' fields. Now it may return the raw map which could have different structure or additional fields. This could break existing code that expects the consistent structure.

Suggested change
if (_rawMap.isNotEmpty) return _rawMap;

Copilot uses AI. Check for mistakes.
@ming-chu ming-chu changed the title Remove the LiveKitSettings object since we have that in aira_call Remove the LiveKitSettings object since we have that in aira_call (FE-81) Oct 7, 2025
kasemj
kasemj previously approved these changes Oct 7, 2025
@ming-chu ming-chu merged commit f529372 into main Oct 7, 2025
1 check passed
@ming-chu ming-chu deleted the feature/remove-the-unused-livekitsetting-obj branch October 7, 2025 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants