Flutter: Show Draggable Bottom Sheet Without Blocking UI Elements in the Background - flutter

I am trying to create a workflow by which when a user presses a button, a draggable bottom sheet will appear with more controls but will still allow the user to interact with the controls in the background.
The default bottom sheet is not draggable and I also tried adding a DraggableScrollableSheet but then the background controls gets blocked.
How can I implement this workflow?

Try wrapping the bottom sheet with a gestureDetector and set its behaviour to translucent.
GestureDetector(
behavior: HitTestBehavior.translucent,
child:
)
Not sure if this works on alert or bottom sheet. Please let me know if it worked

Related

How to show appbar on draggable modal bottom sheet in flutter on full screen mode

I want to create a draggable modal bottom sheet, and when the user scrolls that to full screen, an app bar widget shows on top. Something like this:
But I don't find any package or tutorial for doing that in flutter. Can you show me a sample, please?
hey i think i might able help you but with a theoretical answer.
i think you could achieve this by not actually using the app bar instead make a check that if bottom sheet height is equal to the screen height then you can simply show a app bar type widget inside bottom sheet because back screen app bar won't be visible at that time .

Scroll down event to show appbar based on category - Flutter

I have an AppBar and other things in my layout. When user scrolls down, I want AppBar(actually, the Toolbar to show based on category).
How to achieve this appbar appear when scrolling the listview ?
Here the example i want to make like this.
Before scrolling
After Scrolling Appbar Appear and fixed at top

How to make the button not hidden by keyboard in Flutter

I have an app that has multiple textfields and a button that analyze the data entered.
When I fill the textfields, the keyboard pops up and hide the button.
I want the app to slide up completely away from the keyboard.
FYI: resizeToAvoidBottomInset is set to true, and the main column is wrapped in singlechildview.
Button shown
Button hidden by keyboard
Just add this Property in SinglechildScrollview:
reverse: true
It will solve your problem.

Flutter handle scroll actions (PrimaryScrollController reverse listview)

On iOS, tapping the status bar makes PrimaryScrollController go to the top:
https://flutter.dev/docs/resources/platform-adaptations#return-to-top
On iOS, tapping the OS status bar scrolls the primary scroll controller to the top position. There is no equivalent behavior on Android.
My PrimaryScrollController is attached to a ListView with reverse:true, so tapping the status bar makes it scroll to the bottom.
Docs say PrimaryScrollView handles ScrollAction if not handled by another scroll controller.
https://api.flutter.dev/flutter/widgets/PrimaryScrollController-class.html
If a ScrollAction is not handled by an otherwise focused part of the application, the ScrollAction will be evaluated using the scroll view associated with a PrimaryScrollController
How can I handle scroll actions myself so I can reverse the direction PrimaryScrollController goes when the status bar is tapped?
The easiest way to accomplish this is likely going to be reversing the items in your list instead of using the reverse: true flag of ListView.
For example:
ListView(
children: [
Container(),
Container(),
].reversed.toList(),
),
Trying to solve this any other way would get pretty involved. Since we don't have access to the StatusBar we can't override its behavior or listen for taps on it.

How can I create an overlay barrier that captures onTap events, but also passes them through to the widgets behind?

My question is: How can I create a widget that "watches" and reacts to tap gestures without consuming them?
I want to create a TextField that displays autocomplete suggestions in a popup overlay below the field when it is focused (similar to Google Search).
The overlay should close when the users taps the screen outside of the TextField, but without consuming the tap event.
For example, if the user taps a checkbox while the suggestions overlay is visible, the overlay should close and the checkbox should be toggled.
I looked at the source of Flutter's DropdownButton, which displays the list of dropdown items in a PopupRoute that can be dismissed by tapping the screen. Internally, PopupRoute creates a screen-filling ModalBarrier that captures tap events with a GestureDetector (but it consumes the gesture events and does not pass them through).
You can use GestureDetector with a HitTestBehavior set to translusent