GestureDetector in Flutter: how to detect long press into vertical drag? - flutter

I have a question about the GestureDetector widget in Flutter. I have the following situation: I have two buttons. I want to do something when the first button is long pressed. Then I want to do something when the user drags vertically over the second button still in press from the first button.
How can I do this with the GestureDetector widget in Flutter?

There is a draggable class on flutter that will serve better your purpose check this https://api.flutter.dev/flutter/widgets/Draggable-class.html

Related

Please tell me name of this action in flutter (when pressing on item in tabbar)

When I tap on a item on tab bar a circle will appear and disappear, please tell me name of this animation and how could I implement it in a flutter
click for seeing sample
The effect is called a ripple. And you can get it by wrapping a widget in an Inkwell.
See more here about it here: https://docs.flutter.dev/cookbook/gestures/ripples
Hi In Scaffold BottomNavigationBar() has inbuilt properties of circle appear and disappear
You can use a widget called Gesture Detector which also has ripple effect

How to prevent Expanded to shrink GestureDetector's tap area?

I've been trying to make Bookmark button's onTap work because it was working only sometimes.
I'm using the Expanded widget in the Bookmark button but when I toggle debug point on, I saw that its area is shrunk and that's why taps are not working. I give this widget size and added HitTestBehavior.translucent on GestureDetector but no luck.
Any idea how I can fit this button without losing its tap area?

How to make slide in transition for ListTile in listview in Flutter

I am making an app whose structure is very simple.
A ListView with Listtiles in it.
I want to add animation such that when the screen is opened the listtiles slide in.
Flutter provides a AnimatedList Widget.
Perhaps this native widget will give you the desired output

How to show a widget only when user swipes down?

How can I show a widget in Flutter only when the user swipes down like this
Use GestureDetector widget in the place where you want the user to swipe. It has alot of options like double tap, long press, vertical and horizontal drags and many more.
GestureDetector( //onHOrizontalDrag Options );

Implement next,previous,home page,share button throughout my flutter app

1.I have created a lesson app USING FLUTTER in which I want to implement next,previous,share & home button in each page...How can I do this
2.I need your help
If you have a scaffold, this will have an appbar and you place the actions in the appbar with icon buttons.
A scaffold also has a body which can be a pageview which in turn, can hold your various pages.
Depending on the app, you might get the pageView or a gestureDetector to give you swipe left and right for your previous or next.