Skip to content

chore: update example project to Flutter 3.22, fix web interop, bump dependencies - #586

Open
giovanniPolatoO wants to merge 1 commit into
flutter-webrtc:mainfrom
giovanniPolatoO:main
Open

chore: update example project to Flutter 3.22, fix web interop, bump dependencies#586
giovanniPolatoO wants to merge 1 commit into
flutter-webrtc:mainfrom
giovanniPolatoO:main

Conversation

@giovanniPolatoO

Copy link
Copy Markdown

Summary

Modernizes the example project and fixes a compilation error on Flutter Web
caused by breaking changes in dart:js_interop.

Fixes

  • fix(web): convert WebSocket protocol String to JSString for dart:js_interop
    compatibility (WebSocket(_url, 'sip') → WebSocket(_url, ['sip'.toJS].toJS))
    Resolves compilation error: "The argument type 'String' can't be assigned
    to the parameter type 'JSAny'"

Android

  • Upgrade Gradle wrapper: 8.12.0 → 8.14.0
  • Upgrade Android Gradle Plugin: 8.9.1 → 8.11.1
  • Upgrade Kotlin: 2.1.0 → 2.2.20
  • Migrate app/build.gradle.kts to Built-in Kotlin (removes manual KGP apply)

SDK & Environment

  • Bump Flutter SDK requirement: >=1.10.0 → >=3.22.0
  • Bump Dart SDK requirement: >=2.15.0 <3.0.0 → >=3.4.0 <4.0.0

Dependencies (example/pubspec.yaml)

  • bloc: ^9.0.0 → ^9.2.1
  • shared_preferences: ^2.2.0 → ^2.5.5
  • permission_handler: ^11.1.0 → ^12.0.1
  • provider: 6.1.2 (pinned) → ^6.1.5+1
  • logger: ^2.5.0 → ^2.7.0
  • lints: ^4.0.0 → ^6.1.0 (dev)

Notes

  • flutter_webrtc still applies KGP directly; tracked upstream at
    flutter-webrtc/flutter-webrtc. No action possible on our side yet.

Bumps Flutter SDK to 3.22.0 and Dart SDK to 3.4.0.
This includes:
- Updating Android Gradle Plugin, Kotlin, and Gradle wrapper versions.
- Migrating iOS project files for CocoaPods integration, `AppDelegate` changes, and `Info.plist` updates for scene manifest.
- Adjusting web interop for WebSocket protocol handling.
- Updating various package dependencies in the example project.
@himanshujjp

Copy link
Copy Markdown

This change overlaps with PR #568, which already applies the same fix.

@giovanniPolatoO

Copy link
Copy Markdown
Author

Hi @himanshujjp, thanks for pointing that out!

Do you know if/when #568 is expected to be merged? If it already covers the WebSocket/js_interop fix for web, I'm happy to rebase this PR on top of it and keep only the additional changes here (Android Gradle/AGP/Kotlin updates and dependency bumps), to avoid duplicating work.

Let me know how you'd like to proceed — happy to close this one and open a follow-up once #568 lands, or keep it open and adjust the diff, whichever is easier to manage on your end.

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.

2 participants