Flutter: dynamic bottom sheet height to fit content - flutter

I am trying to create a bottom sheet that resizes according to the content inside it. Only thing I found regarding bottom sheet's height is how to make it a fixed amount, but I would like to fit the content anytime it changes.

Related

Bottom sheet width is half of the screen flutter

Flutter i am developing an app in 8 inch emulator. As you can see in the image my bottom sheet doesnt cover all the width. I tried to change constraints, containers width but nothing has changed.
i will add code in comment
Did you try getting rid of the top Center? You don't include the rest of the modal, so the combo of the Center, and perhaps some width constraint you have further down is limiting the width. Otherwise, include your full modal code in the question section, not the comments.

How to create overlapping header in flutter?

I'm kinda new to Flutter and I am trying to build a home page where the header is at the back of the main content. So when the app is scrolling, the content in front is overlapping the header.
Like this
The main goal I want to achieve is overlapping scrolling. But it's nice if I can make the status bar color and the border radius changes when I scroll up the content, but I guess it's kinda advanced?
Can I user SliverAppBar to make it works like that? or are there any plugins for that?
Thank you
You can use Draggable Scrollable Sheet for this with min height of 0.7 to 0.8.
https://api.flutter.dev/flutter/widgets/DraggableScrollableSheet-class.html

How to set flutter bottom sheet height fit with inner content?

how to control flutter bottom sheet height with its inner content without fixed height? totally I just want a height change with its inner content size
Use a ConstrainedBox give a minimum and maximum height and width as you need and the child of the ConsrainedBox should be your bottom sheet container and you are good to go.
Here is the youtube link on ConstrainedBox.
Here is more how you can deal with box constraints: https://flutter.dev/docs/development/ui/layout/box-constraints

Proper way, that make a screen scrollable if the content is greater than the screen - Flutter

I am looking for the proper way, how can I use scrollable view only if necessary.
I want to create a card which will have an 500 height container. In this case some small-screen device could not show the content properly specially if the keyboard is showing.
In this case the screen should be scrollable, but I cant find a good solution.
I used a SingleChildScrollView with a Column child. Inside the column there was the Card view with the content.

How can I attach bottom bar to top of bottom sheet?

I have a bottom container with a progress bar in it, and when i click or swipe up i need it to follow the bottom sheet as a header.
Can I attach it to the bottom sheet or can I implement it in the sheet itself and then have the sheet peek up by some offset?
I've watched all guides, tutorials and flutter demos of the first few google pages and I cant seam to find any information about it.
Please provide me some guidance so I can flutter in the right direction.
This effect can be achieved using some basic widget building.
StackView
Container: background overlay
Column: MainAxisSize.max
Container: height = (screenHeight - bottomBarHeight)
BottomBar: fixes size
Container: Bottom Dialog
Create a fullscreen stateful widget with a fixed size using MediaQuery.size.height. When tapped animate the Column up to distance you want this to go, most likely the height of the Bottom Dialog Container.
Animating the y property of the Column should get this to work fine.