Improve loading state UI of search tiles

This commit is contained in:
Grant Skinner 2022-09-26 16:41:58 -06:00
parent 58c95f10d9
commit 181a0783fd

View File

@ -8,15 +8,13 @@ class _ResultTile extends StatelessWidget {
@override
Widget build(BuildContext context) {
final Widget content = Container(
color: $styles.colors.black,
width: double.infinity,
child: AppImage(
final Widget image = AppImage(
key: ValueKey(data.id),
image: NetworkImage(data.imageUrl),
fit: BoxFit.cover,
scale: 0.5,
),
distractor: true,
color: $styles.colors.greyMedium.withOpacity(0.2),
);
return AspectRatio(
@ -26,7 +24,12 @@ class _ResultTile extends StatelessWidget {
child: AppBtn.basic(
semanticLabel: data.title,
onPressed: () => onPressed(data),
child: content,
child: Container(
color: $styles.colors.black,
width: double.infinity, // force image to fill area
height: double.infinity,
child: image,
),
),
),
);