fix(flutter): mini player art fills its 48dp box (BoxFit.cover)
Image with width+height but no fit paints the source at its intrinsic resolution inside the box. The cover-cache thumbnails are smaller than 48dp, so the art rendered as a tiny inset in the slate box instead of filling it. Cover stretches/crops uniformly to fill.
This commit is contained in:
@@ -98,6 +98,11 @@ class _TrackInfo extends StatelessWidget {
|
||||
: NetworkImage(media.artUri.toString()),
|
||||
width: 48,
|
||||
height: 48,
|
||||
// Without a fit, Image paints the source at its intrinsic
|
||||
// resolution inside the 48dp box — a thumbnail-sized cover
|
||||
// would render as a tiny inset. Cover stretches/crops to
|
||||
// fill the box uniformly.
|
||||
fit: BoxFit.cover,
|
||||
errorBuilder: (_, __, ___) =>
|
||||
Container(width: 48, height: 48, color: fs.slate),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user