简体   繁体   English

Flutter 通过手势或 function 平移/缩放

[英]Flutter pan/zoom via gesture or function

My goal is to have a container of some sort, that I can zoom and pan via gestures, but also need to be able to zoom and pan to a specific location in the container via a button.我的目标是拥有某种容器,我可以通过手势进行缩放和平移,但还需要能够通过按钮缩放和平移到容器中的特定位置。 I've tried all sorts of combinations of GestureDetector's mixed with Matrix4Transform and MatrixGestureDetector but am not having any luck allowing both hand and function initiated gestures to work together.我已经尝试了 GestureDetector 与 Matrix4Transform 和 MatrixGestureDetector 混合的各种组合,但没有任何运气允许手和 function 发起的手势一起工作。 Does anyone have something like this already working, and if so could you share any hints?有没有人有这样的东西已经工作了,如果有,你能分享任何提示吗? Thanks谢谢

Take a look at this package: photo_view .看看这个 package: photo_view

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM