v2.0.1pinch_zoom
一个基于 Flutter 新版 Interactive Viewer 的小部件,可实现图片的捏合缩放,并在释放时返回初始大小和位置。
221喜欢 1.2万近 30 天下载150Pub 分数
AndroidiOSWebmacOSWindowsLinux
一个基于 Flutter 新版 Interactive Viewer 的小部件,可实现图片的捏合缩放,并在释放时返回初始大小和位置。
以下为英文项目原文快照,最新内容请访问 GitHub。
A widget based on Flutter's Interactive Viewer that makes picture pinch zoom, and return to its initial size and position when released.
This package offers Instagram based pinch zooming that feels more responsive than other similar packages.
The package is designed for zooming in on images; however, it can also be used to zoom in on a video.

Add this to your pubspec.yaml dependencies:
pinch_zoom: ^2.0.1
Add the widget to your app like this (It automatically takes the size of the image you pass to it):
PinchZoom(
child: Image.network('https://placecats.com/640/360'),
maxScale: 2.5,
onZoomStart: (){print('Start zooming');},
onZoomEnd: (){print('Stop zooming');},
),
依赖清单 3 项
{"sdk":"flutter"}{"sdk":"flutter"}—先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗