Skip to content

fix: Undefined name 'platformViewRegistry'. #2273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2025

Conversation

arthurbcd
Copy link
Contributor

The ui.platformViewRegistry (currently deprecated) will be removed on the next flutter stable release.

Which throws:
Error: Undefined name 'platformViewRegistry'.

The solution is to use dart:ui_web instead of dart:ui, both available in flutter.

@peilinok
Copy link
Contributor

@arthurbcd
We greatly appreciate your contribution. Version 6.5.2 will be released shortly with this fix included. We will also ensure this fix is cherry-picked into our other main branches.

related to flutter/engine#41877

@peilinok peilinok merged commit 227bc28 into AgoraIO-Extensions:main Apr 23, 2025
30 of 31 checks passed
peilinok pushed a commit that referenced this pull request Apr 23, 2025
The ui.platformViewRegistry (currently deprecated) will be removed on
the next flutter stable release.

Which throws:
`Error: Undefined name 'platformViewRegistry'.`

The solution is to use `dart:ui_web` instead of `dart:ui`, both
available in flutter.
@peilinok
Copy link
Contributor

according to flutter/engine@f37e78c
use dart:ui_web. platformViewRegistry requires stable version at least 3.12.0

peilinok added a commit that referenced this pull request Apr 24, 2025
peilinok added a commit that referenced this pull request Apr 24, 2025
revert #2273

@arthurbcd 

I've investigated the test failures and discovered a complex situation:
- Initially, when running tests on the external PR, only the base branch
was checked out (not including the commit in question:
https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/actions/runs/14608607680/job/40982332098).
This led to a false positive in our test results.

- Further testing revealed multiple test failures on the main branch. To
address this, I attempted to:
- First, pin the minimum Flutter SDK version to 3.13.0 (which includes
the ui-web fix
flutter/engine@f37e78c)
  - However, this still resulted in numerous test failures
 
- Given these issues, I've decided to:
  - Revert the problematic commit for now
- Create a new issue to track this problem and work on a proper solution
@atetatet
Copy link

Hi, I'm still having this issue

agora_rtc_engine-6.5.2/lib/src/impl/platform/web/global_video_view_controller_platform_web.dart:53:8: Error: Undefined name 'platformViewRegistry'.
ui.platformViewRegistry.registerViewFactory(_platformRendererViewType

I'm in flutter version 3.32.0

@peilinok
Copy link
Contributor

Hi, I'm still having this issue

agora_rtc_engine-6.5.2/lib/src/impl/platform/web/global_video_view_controller_platform_web.dart:53:8: Error: Undefined name 'platformViewRegistry'. ui.platformViewRegistry.registerViewFactory(_platformRendererViewType

I'm in flutter version 3.32.0

Hi @atetatet , please follow #2291 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants