Skip to content

Minor fixes 1#1041

Open
hiroshihorie wants to merge 10 commits intomainfrom
hiroshi/minor-fixes-1
Open

Minor fixes 1#1041
hiroshihorie wants to merge 10 commits intomainfrom
hiroshi/minor-fixes-1

Conversation

@hiroshihorie
Copy link
Member

@hiroshihorie hiroshihorie commented Mar 25, 2026

A collection of minor/simple fixes.

Use events.once instead of events.on so the deferred EngineTrackAddedEvent fires only on the next connected event and does not persist across future reconnects.
Ensure the _regionUrlProvider null check gates both exception branches so ConnectException does not bypass the guard and dereference a null provider.
Initialize the reconnect attempt counter so the first reconnect path does not hit a null assertion before retry handling begins.
Change return type from void to Future<void> so callers can await
errors and the async body is not silently fire-and-forget.
Check completer.isCompleted in the while loop so the polling stops
when the EngineClosingEvent fires, instead of spinning forever.
Wrap event.response.clientConfiguration.forceRelay in ${} so the full
property path is interpolated instead of printing the Event object.
Use the pc parameter passed to _handleGettingConnectedServerAddress instead of always using publisher.pc, so subscriber connections report the correct remote address.
Remove the first pub.dispose() call in removePublishedTrack so track
cleanup (stop, removeTrack, negotiate, onUnpublish) runs before the
track is disposed. Fixes both LocalParticipant and RemoteParticipant.
@github-actions
Copy link

github-actions bot commented Mar 25, 2026

Caution

Breaking change detected without major changeset

dart-apitool detected the following breaking changes:

Preparing git repository: https://github.com/livekit/client-sdk-flutter
Using ref: main
Cloning git repository: https://github.com/livekit/client-sdk-flutter
Checking out ref: main
Successfully cloned to: /tmp/YBVPLF
Preparing package dependencies for git package https://github.com/livekit/client-sdk-flutter (forced Flutter)
Resolving dependencies...
Downloading packages...
  _fe_analyzer_shared 85.0.0 (98.0.0 available)
  analyzer 7.7.1 (12.0.0 available)
  build 2.5.4 (4.0.5 available)
  build_config 1.1.2 (1.3.0 available)
  build_resolvers 2.5.4 (3.0.4 available)
  build_runner 2.5.4 (2.13.1 available)
  build_runner_core 9.1.2 (9.3.2 available)
  dart_style 3.1.1 (3.1.8 available)
  flutter_webrtc 1.4.0 (1.4.1 available)
  json_annotation 4.9.0 (4.11.0 available)
  json_serializable 6.9.5 (6.13.1 available)
  meta 1.17.0 (1.18.2 available)
  mockito 5.4.6 (5.6.4 available)
  source_gen 2.0.0 (4.2.2 available)
  source_helper 1.3.7 (1.3.11 available)
  test_api 0.7.10 (0.7.11 available)
  vector_math 2.2.0 (2.3.0 available)
  win32 5.15.0 (6.0.0 available)
  win32_registry 2.1.0 (3.0.2 available)
Got dependencies!
19 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Resolving dependencies in `./example`...
Downloading packages...
Got dependencies in `./example`.
Preparing . (forced Flutter)
Copying sources from .
Preparing package dependencies for local package . (forced Flutter)
Resolving dependencies...
Downloading packages...
  _fe_analyzer_shared 85.0.0 (98.0.0 available)
  analyzer 7.7.1 (12.0.0 available)
  build 2.5.4 (4.0.5 available)
  build_config 1.1.2 (1.3.0 available)
  build_resolvers 2.5.4 (3.0.4 available)
  build_runner 2.5.4 (2.13.1 available)
  build_runner_core 9.1.2 (9.3.2 available)
  dart_style 3.1.1 (3.1.8 available)
  flutter_webrtc 1.4.0 (1.4.1 available)
  json_annotation 4.9.0 (4.11.0 available)
  json_serializable 6.9.5 (6.13.1 available)
  meta 1.17.0 (1.18.2 available)
  mockito 5.4.6 (5.6.4 available)
  source_gen 2.0.0 (4.2.2 available)
  source_helper 1.3.7 (1.3.11 available)
  test_api 0.7.10 (0.7.11 available)
  vector_math 2.2.0 (2.3.0 available)
  win32 5.15.0 (6.0.0 available)
  win32_registry 2.1.0 (3.0.2 available)
Got dependencies!
19 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Resolving dependencies in `./example`...
Downloading packages...
Got dependencies in `./example`.
Omitting pub get (package config already present)
Analyzing /tmp/YBVPLF
Omitting pub get (package config already present)
Analyzing .
Cleaning up
Cleaning up
Checking Package version
ignoring prerelease
-- Generating report using: Console Reporter --
BREAKING CHANGES
└─┬ Class Engine
  ├── Method "clearReconnectTimeout" removed (CE10)
  ├── Method "clearPendingReconnect" removed (CE10)
  ├── Field "reconnectAttempts" removed (CF01)
  ├── Field "reconnectTimeout" removed (CF01)
  ├── Field "reconnectStart" removed (CF01)
  └── Field "attemptingReconnect" removed (CF01)
No non-breaking changes!
To learn more about the detected changes visit: https://github.com/bmw-tech/dart_apitool/blob/main/readme/change_codes.md
Version Check
New Version is too low!

Old version: "2.7.0"
New version: "2.7.0"
Needed version: "3.0.0"

Got "2.7.0" expected >= "3.0.0" (breaking changes)

If this is intentional, please add a changeset with major level in .changes/:

major type="changed" "Description of breaking change"

Add missing await after sendSyncState return type was changed to
Future<void>, fixing the unawaited_futures analyzer warning.
@hiroshihorie hiroshihorie changed the title Hiroshi/minor fixes 1 Minor fixes 1 Mar 25, 2026
@hiroshihorie hiroshihorie marked this pull request as ready for review March 25, 2026 06: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.

1 participant