Check if widget is mounted before precaching image
This commit is contained in:
parent
59dcc38ba5
commit
25de85aea6
1 changed files with 1 additions and 1 deletions
|
@ -168,7 +168,7 @@ class _ZoomableImageState extends State<ZoomableImage>
|
|||
|
||||
void _onLargeThumbnailLoaded(
|
||||
ImageProvider imageProvider, BuildContext context) {
|
||||
if (!_loadedFinalImage) {
|
||||
if (mounted && !_loadedFinalImage) {
|
||||
precacheImage(imageProvider, context).then((value) {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
|
|
Loading…
Add table
Reference in a new issue