Indicate an item is a video

This commit is contained in:
Ming Ming 2021-06-22 13:23:28 +08:00
parent 2e9bc412f5
commit 4079ba39f2

View file

@ -64,7 +64,9 @@ class PhotoListVideo extends StatelessWidget {
return FittedBox(
clipBehavior: Clip.hardEdge,
fit: BoxFit.cover,
child: Container(
child: Stack(
children: [
Container(
// arbitrary size here
constraints: BoxConstraints.tight(const Size(128, 128)),
color: AppTheme.getListItemBackgroundColor(context),
@ -81,7 +83,7 @@ class PhotoListVideo extends StatelessWidget {
return Container(
child: Center(
child: Icon(
Icons.videocam,
Icons.image_not_supported,
size: 64,
color: Colors.white.withOpacity(.8),
),
@ -91,6 +93,19 @@ class PhotoListVideo extends StatelessWidget {
imageRenderMethodForWeb: ImageRenderMethodForWeb.HttpGet,
),
),
Container(
// arbitrary size here
constraints: BoxConstraints.tight(const Size(128, 128)),
alignment: AlignmentDirectional.topEnd,
padding: const EdgeInsets.all(8),
child: const Icon(
Icons.play_circle_outlined,
size: 24,
color: Colors.white,
),
),
],
),
);
}