Skip to content

Commit

Permalink
(viewer) Fix #8
Browse files Browse the repository at this point in the history
  • Loading branch information
violet-dev committed Jul 20, 2020
1 parent 8e60776 commit 99b2254
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/pages/viewer/vertical_viewer_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,13 @@ class _ViewerWidgetState extends State<ViewerWidget> {
@override
void dispose() {
scroll.dispose();

PaintingBinding.instance.imageCache.clear();
PaintingBinding.instance.imageCache.clearLiveImages();

widget.urls.forEach((element) async {
await CachedNetworkImageProvider(element).evict();
});

super.dispose();
}

Expand Down Expand Up @@ -371,7 +376,6 @@ class GalleryExampleItemThumbnail extends StatelessWidget {
},
),
);
imageCache.clear();
return completer.future;
}
}

0 comments on commit 99b2254

Please sign in to comment.