From 134b1f417e1ffa435c63f217d84688a7e4d2fd62 Mon Sep 17 00:00:00 2001 From: Vishnu Mohandas Date: Thu, 13 Aug 2020 04:58:16 +0530 Subject: [PATCH] Show the play button overlay for network videos too --- lib/ui/thumbnail_widget.dart | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/ui/thumbnail_widget.dart b/lib/ui/thumbnail_widget.dart index c3efaab57..c838101dc 100644 --- a/lib/ui/thumbnail_widget.dart +++ b/lib/ui/thumbnail_widget.dart @@ -38,17 +38,20 @@ class _ThumbnailWidgetState extends State { @override Widget build(BuildContext context) { + var image; if (widget.file.localID == null) { - return _getNetworkImage(); + image = _getNetworkImage(); + } else { + _loadLocalImage(context); + if (_imageProvider != null) { + image = Image( + image: _imageProvider, + fit: widget.fit, + ); + } } - - _loadLocalImage(context); var content; - if (_imageProvider != null) { - final image = Image( - image: _imageProvider, - fit: widget.fit, - ); + if (image != null) { if (widget.file.fileType == FileType.video) { content = Stack( children: [