preloadImages static method
Preloads the gsUrls
images and stores them
Implementation
static void preloadImages(
List<String> gsUrls,
BuildContext context, {
Function? onFinish,
}) {
int counter = 0;
for (var gsUrl in gsUrls) {
precacheImage(PCacheImage(gsUrl), context).then((value) {
getImage(gsUrl);
counter++;
if (counter == gsUrls.length && onFinish != null) {
onFinish();
}
});
}
}