i am try to get image from video url when my list scroll but when i use of video thumbnail library and call it in my app list freezed and my app crashed this is my code
Future _loadMore(context) async {
final diractory=Provider.of<DiractoryPath>(context,listen: false);
Provider.of<LoadState>(context).setLoadState(true);
final index= Provider.of<IndexLazyloading>(context);
if(moves.length!=index.oldmove){
resetlist(context);
}
// Add in an artificial delay
for (var i = index.currentindex; i <= index.currentindex + increment && i<moves.length; i++) {
File f=new File( "${diractory.diractory}/${moves[i].videourl.split("/").last.replaceAll("mp4", "png")}");
if(!f.existsSync())
await getimage("${strings.baseurl}/videos/${moves[i].videourl}",context);
index.setdata(i);
}
await new Future.delayed(const Duration(seconds: 2));
Provider.of<LoadState>(context).setLoadState(false);
index.setcurrentIndex(index.data.length) ;
index.setoldMove(moves.length);
}
and this is my plugin that used
Future<Null> getimage(videourl,context)async{
final uint8list = await VideoThumbnail.thumbnailFile(
video: videourl,
thumbnailPath: Provider.of<DiractoryPath>(context).diractory,
imageFormat: ImageFormat.WEBP,
maxHeightOrWidth: 0, // the original resolution of the video
quality: 75,
);
}
i try with png but dont work this is my list that call this function what is problem in this code please help me
LazyLoadScrollView(
isLoading: loadstate.isload,
onEndOfPage: () => _loadMore(context),
child: ListView.builder(
itemCount: indexlayze.data.length,
itemBuilder: (context, position) {
return _buildProductItem(context,position);
},
));
my list get 10 image thumbnail when reach to end of list but is very slow how to handle it
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
I am developing a peer-to-peer chat app using socket programming in androidThe port number of self and IP address and port number of the other peer is given as input and connection is established through socket
How do i show images of all installed apps in a recyclerView in android with an animation like it is being scanned?
An application is published on Play Store and it is using 'application data folder' for the backup-restore purpose using Drive APIEverything works fine
In Android, how can I record the local video in a WebRTC video call?