Currently I am working on a application like snapchat and tik-tok and I need to pre buffer videos or store them in cache memory before playing and play them from cache memory
Currently I am working on a application like snapchat and tik-tok and I need to pre buffer videos or store them in cache memory before playing and play them from cache memory
Use precache() method to pre-load the videos before rendering the screen.
@override
void didChangeDependencies() {
precacheImage(theImage.image, context);
super.didChangeDependencies();
}
Or use precacheImage(videoName, context); before returning Widget in build method.