pinch_zoom_image
一个可实现图片捏合缩放的控件,释放后返回初始大小和位置。
- 星标
- 51
- 复刻
- 51
- 最近推送(UTC)
- 2019年12月9日
- 项目状态
- 未归档
原始 README
以下为英文项目原文快照,最新内容请访问 GitHub。
Pinch Zoom Image
A widget that makes picture pinch zoom, Instagram style!

Installation
Add this to your pubspec.yml dependencies:
pinch_zoom_image: "^0.2.5"
How to use
Add the widget to your app like this (It automatically takes the size of the image you pass to it):
PinchZoomImage(
image: Image.network('https://i.imgur.com/tKg0XEb.jpg'),
zoomedBackgroundColor: Color.fromRGBO(240, 240, 240, 1.0),
hideStatusBarWhileZooming: true,
onZoomStart: () {
print('Zoom started');
},
onZoomEnd: () {
print('Zoom finished');
},
),
The zoomedBackgroundColor is the color that fills the image's space when the use is zooming it and moving it on the screen.
If you want images from internet to be cached for offline use or data saving, you can also use this with the cached_network_image widget:
PinchZoomImage(
image: CachedNetworkImage(
imageUrl: 'https://i.imgur.com/tKg0XEb.jpg',
),
zoomedBackgroundColor: Color.fromRGBO(240, 240, 240, 1.0),
hideStatusBarWhileZooming: true,
),
Enjoy!
语言DartRubyKotlinSwiftObjective-C
使用的依赖
依赖清单 1 项
- flutter
{"sdk":"flutter"}
如何选择适合项目的代码仓?
先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
- 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
- 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
- 使用前在 GitHub 核对 README、许可证与 Issues。
来源与维护
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗
