add a setting for original image

This commit is contained in:
wgh19
2024-05-31 19:32:46 +08:00
parent 5e53c57755
commit 9275024050
4 changed files with 20 additions and 4 deletions

View File

@@ -318,6 +318,10 @@ class _IllustPageState extends State<IllustPage> {
}
Widget image;
var imageUrl = appdata.settings["showOriginalImage"]
? widget.illust.images[index].original
: widget.illust.images[index].large;
if (!widget.illust.isUgoira) {
image = SizedBox(
width: imageWidth,
@@ -327,8 +331,7 @@ class _IllustPageState extends State<IllustPage> {
child: Image(
key: ValueKey(index),
image: downloadFile == null
? CachedImageProvider(widget.illust.images[index].large)
as ImageProvider
? CachedImageProvider(imageUrl) as ImageProvider
: FileImage(downloadFile) as ImageProvider,
width: imageWidth,
fit: BoxFit.cover,