Add a getter for the thumbnail URL
This commit is contained in:
parent
1e336897d4
commit
6990faa451
2 changed files with 8 additions and 6 deletions
|
@ -71,6 +71,10 @@ class Photo {
|
|||
return Configuration.instance.getHttpEndpoint() + "/" + remotePath;
|
||||
}
|
||||
|
||||
String getThumbnailUrl() {
|
||||
return Configuration.instance.getHttpEndpoint() + "/" + thumbnailPath;
|
||||
}
|
||||
|
||||
Future<Uint8List> getOriginalBytes() {
|
||||
return getAsset().originBytes;
|
||||
}
|
||||
|
|
|
@ -89,12 +89,10 @@ class _ThumbnailWidgetState extends State<ThumbnailWidget> {
|
|||
}
|
||||
|
||||
void _loadNetworkImage() {
|
||||
final path = widget.photo.thumbnailPath.isNotEmpty
|
||||
? widget.photo.thumbnailPath
|
||||
: widget.photo.remotePath;
|
||||
_imageProvider =
|
||||
Image.network(Configuration.instance.getHttpEndpoint() + "/" + path)
|
||||
.image;
|
||||
final url = widget.photo.thumbnailPath.isNotEmpty
|
||||
? widget.photo.getThumbnailUrl()
|
||||
: widget.photo.getRemoteUrl();
|
||||
_imageProvider = Image.network(url).image;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
Loading…
Add table
Reference in a new issue