Add an icon to clearly indicate that local files are not synced

This commit is contained in:
Ming Ming 2022-09-05 13:05:48 +08:00
parent 04fcbfde94
commit 50849817a6

View file

@ -166,12 +166,15 @@ class PhotoListLocalImageItem extends PhotoListLocalFileItem {
child: 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),
child: Image(
image: ResizeImage.resizeIfNeeded(k.photoThumbSize, null, provider),
image: ResizeImage.resizeIfNeeded(
k.photoThumbSize, null, provider),
filterQuality: FilterQuality.high,
fit: BoxFit.cover,
errorBuilder: (context, e, stackTrace) {
@ -185,6 +188,19 @@ class PhotoListLocalImageItem extends PhotoListLocalFileItem {
},
),
),
Container(
// arbitrary size here
constraints: BoxConstraints.tight(const Size(128, 128)),
alignment: AlignmentDirectional.bottomEnd,
padding: const EdgeInsets.all(8),
child: const Icon(
Icons.cloud_off,
size: 20,
color: Colors.white,
),
),
],
),
),
);
}