feat(ui): Cache tracked cover images for offline use

This commit is contained in:
2023-02-06 16:53:48 +01:00
parent 6a5c970101
commit 67531b84f0
6 changed files with 164 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ class ListItem extends StatelessWidget {
required this.title,
this.onLeftSwipe,
this.onRightSwipe,
this.cached = true,
this.extra = const [],
super.key,
});
@@ -27,6 +28,9 @@ class ListItem extends StatelessWidget {
final void Function()? onLeftSwipe;
final void Function()? onRightSwipe;
/// Flag indicating whether the thumbnail image should be cached
final bool cached;
@override
Widget build(BuildContext context) {
return SwipeableTile.swipeToTrigger(
@@ -68,6 +72,7 @@ class ListItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AnimeCoverImage(
cached: cached,
url: thumbnailUrl,
),