opt: image preview

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-31 17:53:35 +08:00
parent 3ccc7ef69d
commit 61819d9f27

View File

@@ -450,16 +450,24 @@ class _InteractiveviewerGalleryState extends State<InteractiveviewerGallery>
fadeInDuration: const Duration(milliseconds: 0), fadeInDuration: const Duration(milliseconds: 0),
fadeOutDuration: const Duration(milliseconds: 0), fadeOutDuration: const Duration(milliseconds: 0),
imageUrl: _getActualUrl(index), imageUrl: _getActualUrl(index),
// fit: BoxFit.contain, placeholderFadeInDuration: const Duration(milliseconds: 0),
progressIndicatorBuilder: (context, url, progress) { placeholder: (context, url) {
return Center( return CachedNetworkImage(
child: SizedBox( fadeInDuration: const Duration(milliseconds: 0),
width: 150.0, fadeOutDuration: const Duration(milliseconds: 0),
child: imageUrl: Utils.thumbnailImgUrl(widget.sources[index].url),
LinearProgressIndicator(value: progress.progress ?? 0),
),
); );
}, },
// fit: BoxFit.contain,
// progressIndicatorBuilder: (context, url, progress) {
// return Center(
// child: SizedBox(
// width: 150.0,
// child:
// LinearProgressIndicator(value: progress.progress ?? 0),
// ),
// );
// },
// errorListener: (value) { // errorListener: (value) {
// WidgetsBinding.instance.addPostFrameCallback((_) { // WidgetsBinding.instance.addPostFrameCallback((_) {
// setState(() { // setState(() {