feat(flutter): disk-persistent cover cache via cached_network_image
Slice 1 of the cover-caching pass. The previous Image.network /
NetworkImage path only cached covers in memory, so a scroll-off + scroll-
back or an app restart re-downloaded every tile from the server. Swap
to cached_network_image so bytes land on disk (path_provider temp dir,
URL-keyed) and survive both.
Sites migrated:
- ServerImage (all /api/*/cover usage — home grid, library, playlist,
artist/album detail headers)
- DiscoverScreen Lidarr suggestion thumbnails
- PlayerBar mini cover (HTTPS branch; file:// branch unchanged since
AlbumCoverCache files are already on disk)
Auth header forwarding preserved via httpHeaders. Fade-in disabled so
populated grids paint instantly on cache hit.
Slice 2 (pre-warm during sync) builds on this same cache manager.
This commit is contained in:
@@ -30,6 +30,13 @@ dependencies:
|
||||
connectivity_plus: ^6.0.5
|
||||
flutter_timezone: ^4.1.1
|
||||
palette_generator: ^0.3.3
|
||||
# Disk-persistent image cache. Image.network only caches in memory, so
|
||||
# cover art repainted after a scroll-off or app restart re-fetches from
|
||||
# the server. cached_network_image stores the bytes under
|
||||
# path_provider's temp dir keyed by URL, surviving both. Used directly
|
||||
# by ServerImage (auth-aware path) and as CachedNetworkImageProvider
|
||||
# for the mini bar (which composes its own Image widget).
|
||||
cached_network_image: ^3.4.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
Reference in New Issue
Block a user