先上图(样式自己调整)
![](https://i-blog.csdnimg.cn/blog_migrate/e3af4ef21c87485afec5061cbf492370.png)
image.png
1.新建小部件
根据实际情况修改以下部分内容;
return PhotoViewGalleryPageOptions(
imageProvider: ImageUtil.getImageProvider(
widget.photoList[index].url),
minScale: PhotoViewComputedScale.contained * 0.6,
maxScale: PhotoViewComputedScale.covered * 1.1,
initialScale: PhotoViewComputedScale.contained,
);
//PhotoPreview 点击小图后的效果
import 'package:flutter/cupertino.dart';