FLUTTER ECOSYSTEM

tkortekaas/pinch_zoom

一個基於 Flutter 新版 Interactive Viewer 的小部件,可實現圖片的捏合縮放,並在釋放時返回初始大小和位置。

pinch_zoom 專案封面
Stars
38
Forks
12
最近推送(UTC)
2025年4月4日
專案狀態
未封存
Teun Kortekaas GitHub avatar
GITHUB User

Teun Kortekaas ↗

語言DartSwiftKotlinObjective-C

此儲存庫發佈的套件

使用的依賴

依賴清單 3 項
  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}
  • flutter_lints開發依賴

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

pinch_zoom

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.

Example one Example two

Installation

Add this to your pubspec.yaml dependencies:

pinch_zoom: ^2.0.1

How to use

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');},
),