Load full image if thumbnail isn't available

This commit is contained in:
Vishnu Mohandas 2020-05-27 03:26:34 +05:30
parent 69bc22dc39
commit 1e336897d4

View file

@ -89,11 +89,12 @@ class _ThumbnailWidgetState extends State<ThumbnailWidget> {
}
void _loadNetworkImage() {
_imageProvider = Image.network(Configuration.instance.getHttpEndpoint() +
"/" +
widget.photo.thumbnailPath ??
widget.photo.remotePath)
.image;
final path = widget.photo.thumbnailPath.isNotEmpty
? widget.photo.thumbnailPath
: widget.photo.remotePath;
_imageProvider =
Image.network(Configuration.instance.getHttpEndpoint() + "/" + path)
.image;
}
@override