didUpdateWidget method
update widget on scroll
Implementation
@override
void didUpdateWidget(GalleryGridView oldWidget) {
super.didUpdateWidget(oldWidget);
if (oldWidget.path != widget.path) {
cacheMap.clear();
scrolling.value = false;
if (mounted) {
setState(() {});
}
}
}