1 year ago

#246517

test-img

Pushpam

Tiles not getting disposed when going off-screen

I am working on a video conferencing app and displaying 4 video tiles in a view using Staggered Grid View package.For video rendering I am using native surface renderers but I am facing a problem that when certain tiles goes off screen they are not getting disposed and still the video stays on for off-screen tiles causing performance overhead.I want that whenever the tile goes off-screen the video should turn off automatically.Is there any way in which I can optimize other than visibilityDetector package.

MasonryGridView.count(
 cacheExtent: 0,
 addAutomaticKeepAlives: false,
 scrollDirection:
 Axis.horizontal,
 physics: PageScrollPhysics(),
 itemCount: data.item3,
 crossAxisCount: 2,
 itemBuilder: (ctx, index) {
    return VideoTile();//Video Rendering Widget
 },
);

flutter

performance

dart

gridview

staggered-gridview

0 Answers

Your Answer

Accepted video resources