How to show a widget only when user swipes down? - flutter

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 );

Related

Multiple onDismissed functions for one Dimissible widget

I was wondering if it is possible to have a Dismissible widget which does one thing if dragged for less than 25% of the screen and does something else if dragged more than 25% of the screen.
In the example below the first onDismissed function would trigger if the tile was dismissed in the red part and the other onDismissed function would trigger if it was dismissed in the grey part.
No, we don't have any widget like that you want.
You have to create what you want with GestureDetector()

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?

flutter: how to prevent expandable TextField's inner scroll when there is ListView scroll available

Trying to implement the expandable TextField() in ListView(). The page should have one scrollController on the ListView(). If I add text, it should expand the widget with multiline but when I click on the Text it should scroll the entire ListView() rather than keep scrolling inside the TextField().
The Expected Result is here as a video (from Instagram post creation): https://imgur.com/a/1mZ3AT5
I tried while disabling the physics then not able to bring the cursor to the desired position.

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

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

Flutter Sticky widget that belongs to ListView

I want to have a sticky widget similar to the floating widgets in scaffolds, difference is that this widget would belong to a ListView, when it isn't on screen it would behave as a floating widget, when user scrolls so its position be visible it would start animating to stay on its position on the ListView.
Here is a visual example of what I am trying to achieve
https://miro.medium.com/max/1200/1*GsH-kEVNtoDZaM0ZjNYRpQ.gif (the 'MY STICKY BUTTON' widget)
is this even possible in flutter ? and if so how ?
Thanks in advance!