-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
My team and I are facing troubles for a while trying to implements native views inside scrollable content in our App.
The real problem here is that the Platform View rendering is very heavy and as a consequence the scrolling animation make it visible on screen by lag / freezing the UI.
So when native views are placed into ListView / GridView, the entire screen start to freeze because of performance.
Here are 2 videos to illustrate my words. A simple ListView with widgets inside.
The first contain Flutter widgets and the second Native views.
FLUTTER :
| Flutter | NATIVE (IOS) |
|---|---|
Simulator.Screen.Recording.-.iPhone.12.Pro.Max.-.2022-07-12.at.20.25.20.mp4 |
Simulator.Screen.Recording.-.iPhone.12.Pro.Max.-.2022-07-12.at.20.26.00.mp4 |
This is a completely empty App so the freezing could may be not very pronounced here but a simple app with common content (ex: users/photos) is much more impacting.
It was record on IOS but clearly tested on Android too and the problem still persist.
Our App is a full social media (photo / video / story) and when we are trying to add native view inside lists, this app quickly become unusable.
Here are linked issues #96679 (which should not be closed)
GOOGLE ADS SDK
Also currently trying to provide Ads into our Social Media app between photo and videos lists, the performance issue is even worse than the recorded example here while scrolling or animating other components.
ADS are provided with Platform View so the problem is remaining once again here, and this is very restrictive for us because we can not go in production version without ADS and native view because of business model.
Linked issues :
googleads/googleads-mobile-flutter#269
googleads/googleads-mobile-flutter#313
This issue should have a high priority level taking into account the huge impact for company or developers teams into their app.
Thank you.
-- FULL CODE --
-- FLUTTER DOCTOR --
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.4, on macOS 12.4 21F79 darwin-x64, locale
fr-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.65.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
• No issues found!