Remove the LiveKitSettings object since we have that in aira_call (FE-81)#181
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
settingsfield and constructor parameter from theLiveKitclass - Added a null check for
_rawMapin thetoMap()method to return early if already populated - Deleted all
LiveKitSettingsrelated classes and their nested setting classes
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| }) : _rawMap = rawMap; | ||
|
|
||
| Map<String, dynamic> toMap() { | ||
| if (_rawMap.isNotEmpty) return _rawMap; |
There was a problem hiding this comment.
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; |
kasemj
previously approved these changes
Oct 7, 2025
kasemj
approved these changes
Oct 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove the duplicated object and parsing logic since we already have the object to represent the
LiveKitSettinginaira_call.