3

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

Aman
  • 71
  • 3

1 Answers1

-2

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.

Tanha Patel
  • 395
  • 2
  • 9