mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Add an icon to clearly indicate that local files are not synced
This commit is contained in:
parent
04fcbfde94
commit
50849817a6
1 changed files with 34 additions and 18 deletions
|
@ -166,24 +166,40 @@ class PhotoListLocalImageItem extends PhotoListLocalFileItem {
|
||||||
child: FittedBox(
|
child: FittedBox(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
child: Container(
|
child: Stack(
|
||||||
// arbitrary size here
|
children: [
|
||||||
constraints: BoxConstraints.tight(const Size(128, 128)),
|
Container(
|
||||||
color: AppTheme.getListItemBackgroundColor(context),
|
// arbitrary size here
|
||||||
child: Image(
|
constraints: BoxConstraints.tight(const Size(128, 128)),
|
||||||
image: ResizeImage.resizeIfNeeded(k.photoThumbSize, null, provider),
|
color: AppTheme.getListItemBackgroundColor(context),
|
||||||
filterQuality: FilterQuality.high,
|
child: Image(
|
||||||
fit: BoxFit.cover,
|
image: ResizeImage.resizeIfNeeded(
|
||||||
errorBuilder: (context, e, stackTrace) {
|
k.photoThumbSize, null, provider),
|
||||||
return Center(
|
filterQuality: FilterQuality.high,
|
||||||
child: Icon(
|
fit: BoxFit.cover,
|
||||||
Icons.image_not_supported,
|
errorBuilder: (context, e, stackTrace) {
|
||||||
size: 64,
|
return Center(
|
||||||
color: Colors.white.withOpacity(.8),
|
child: Icon(
|
||||||
),
|
Icons.image_not_supported,
|
||||||
);
|
size: 64,
|
||||||
},
|
color: Colors.white.withOpacity(.8),
|
||||||
),
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue