Improve loading state UI of search tiles
This commit is contained in:
parent
58c95f10d9
commit
181a0783fd
@ -8,15 +8,13 @@ class _ResultTile extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final Widget content = Container(
|
final Widget image = AppImage(
|
||||||
color: $styles.colors.black,
|
|
||||||
width: double.infinity,
|
|
||||||
child: AppImage(
|
|
||||||
key: ValueKey(data.id),
|
key: ValueKey(data.id),
|
||||||
image: NetworkImage(data.imageUrl),
|
image: NetworkImage(data.imageUrl),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
scale: 0.5,
|
scale: 0.5,
|
||||||
),
|
distractor: true,
|
||||||
|
color: $styles.colors.greyMedium.withOpacity(0.2),
|
||||||
);
|
);
|
||||||
|
|
||||||
return AspectRatio(
|
return AspectRatio(
|
||||||
@ -26,7 +24,12 @@ class _ResultTile extends StatelessWidget {
|
|||||||
child: AppBtn.basic(
|
child: AppBtn.basic(
|
||||||
semanticLabel: data.title,
|
semanticLabel: data.title,
|
||||||
onPressed: () => onPressed(data),
|
onPressed: () => onPressed(data),
|
||||||
child: content,
|
child: Container(
|
||||||
|
color: $styles.colors.black,
|
||||||
|
width: double.infinity, // force image to fill area
|
||||||
|
height: double.infinity,
|
||||||
|
child: image,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user