-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import features from jiangtian616 fork #3
base: main
Are you sure you want to change the base?
Conversation
Ok, I realized the version I tested was still using
Now when you do step 3. you will zoom in to the amount you were zoomed in at step 2. (3x) instead of 1x. I also opened an issue here: jiangtian616/JHenTai#552 |
I'm finding a way to deal with issue in bluefireteam/photo_view#392, and i notified your issue at flutter/flutter#135482, so i'm trying to figure out whether i can replace What i did:
What i'm doing:
I have not finished my code so there is still some bugs i think, so it can't be merged currently. Besides, I am busy with my real work so I might not have time to spend on this in December... If these features are implemented i think we can expand it to |
I can try working on the double tap feature as I may have some free time soon. I think scrolling + zooming in flutter is really bad right now and I hope there will be a solution that everyone can use. I have opened multiple issues in the flutter repo (150598, 150963, 135482). It is not a priority for them right now, so I don't think we will get an official solution soon. That is why I want to improve this package so that others can use it. (Also, feel free to ask me any question if you have any.) |
@jiangtian616 I added tap to zoom with animation and horizontal axis support (#4, #5) I also created a fork of scrollable_positioned_list here: https://github.com/yakagami/scrollable_positioned_list. The usage is a bit different from your version for double tap. Here is a full example: Exampleclass ZoomViewExample extends StatefulWidget {
const ZoomViewExample({super.key});
@override
State<ZoomViewExample> createState() => _ZoomViewExampleState();
}
class _ZoomViewExampleState extends State<ZoomViewExample> {
ScrollController controller = ScrollController();
//new
ZoomViewGestureHandler handler = ZoomViewGestureHandler(zoomLevels: [2,1]);
@override
Widget build(BuildContext context) {
return Scaffold(
body: ZoomView(
controller: controller,
//new
onDoubleTapDown: (ZoomViewDetails zoomViewDetails){
handler.onDoubleTap(zoomViewDetails);
},
child: ListView.builder(
controller: controller,
itemCount: 10000,
itemBuilder: (context, index) {
return Center(
child: Text("text $index")
);
}
),
),
);
}
}
When you have time and if you are interested, please let me know what you think. |
@jiangtian616 Thanks for adding these features. Could you explain what they do? Looks like you added a double tap to zoom feature and horizontal scrolling. Am I missing anything? Some questions:
Thanks!
(Also, I am thinking of expanding this package to include a fork of
scrollable_positioned_list
to make it easier for users. What do you think?)