title: How to limit draggable scrollable sheet to take height according to its child height in flutter?
body: <p>I am using <code>draggableScrollableSheet</code>. I am giving these parameters </p>
  
  <pre><code>DraggableScrollableSheet(initialChildSize: 0.4,maxChildSize: 1,minChildSize: 0.4,builder: (BuildContext context, ScrollController scrollController) {
              return SingleChildScrollView(controller: scrollController,
                child: Theme(
                  data: Theme.of(context).copyWith(canvasColor: Colors.transparent),
                  child: Opacity(
                    opacity: 1,
                    child: IntrinsicHeight(
                        child: Column(mainAxisSize: MainAxisSize.min,
                          mainAxisAlignment: MainAxisAlignment.start,
                          children: &lt;Widget&gt;[
                            SizedBox(height: 10,),
                            Container(
                              margin: EdgeInsets.only(right: 300),
                              decoration: BoxDecoration(
                                border: Border(
                                  top: BorderSide(
                                      color: Colors.blue,
                                      width: 3,
                                      style: BorderStyle.solid),
                                ),
                              ),
                            ),
                            Card(
                              child: Row(
                                children: &lt;Widget&gt;[
                                  Padding(
                                    padding: const EdgeInsets.all(8.0),
                                    child: Column(
                                      crossAxisAlignment:
                                      CrossAxisAlignment.start,
                                      children: &lt;Widget&gt;[
                                        Text(
                                          S
                                              .of(context)
                                              .we_have_found_you_a_driver,
                                          style: TextStyle(
                                              color: Colors.black,
                                              fontWeight: FontWeight.bold),
                                        ),
                                        SizedBox(
                                          height: 10,
                                        ),
                                        Text(S
                                            .of(context)
                                            .driver_is_heading_towards +
                                            ' ${widget.order.foodOrders.first.food.restaurant.name}')
                                      ],
                                    ),
                                  ),
                                ],
                              ),
                              elevation: 5,
                            ),
                            SizedBox(height: 10,),
                            Card(
                              elevation: 5,
                              child: Row(
                                  mainAxisAlignment: MainAxisAlignment.start,
                                  children: &lt;Widget&gt;[
                                    CircleAvatar(
                                      radius: 50.0,
                                      backgroundColor: Colors.white,
                                      child:
                                      Image.asset(
                                          'assets/img/image_not_available.jpg'),
                                    ),
                                    Expanded(
                                      child: Column(mainAxisAlignment: MainAxisAlignment.start,
                                        children: &lt;Widget&gt;[
                                          Row(mainAxisAlignment: MainAxisAlignment.spaceAround,
                                            children: &lt;Widget&gt;[
                                              Expanded(
                                                child: Text('Test',
                                                    textAlign: TextAlign.start,
                                                    style: new TextStyle(
                                                      color: Colors.black,
                                                      fontSize: 16.0,
                                                    )),
                                              ),
                                              Icon(Icons.star, color: Colors.yellow.shade700,)
                                            ],
                                          ),
                                          SizedBox(height: 30,),
                                          Row(mainAxisAlignment: MainAxisAlignment.spaceAround,
                                            children: &lt;Widget&gt;[
                                              Expanded(
                                                child: Container(
                                                  child: Text('Mobile number',
                                                      textAlign: TextAlign.start,
                                                      style: new TextStyle(
                                                        color: Colors.black,
                                                        fontSize: 16.0,
                                                      )),
                                                ),
                                              ),
                                              Icon(Icons.phone,),
                                              SizedBox(width: 10,),
                                              Icon(Icons.message),
                                            ],
                                          ),
  
                                        ],
                                      ),
                                    )
                                  ]),
                            ),
                            SizedBox(height: 10,),
                            Card(
                              child: Align( alignment: Alignment(-1,1),
                                child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween,
                                  children: &lt;Widget&gt;[
                                    Padding(
                                      padding: const EdgeInsets.all(8.0),
                                      child: Column(
                                        crossAxisAlignment:
                                        CrossAxisAlignment.start,
                                        children: &lt;Widget&gt;[
                                          Text(
                                            S
                                                .of(context)
                                                .you_ordered_from + ' ${widget.order.foodOrders.first.food.restaurant.name}',
                                            style: TextStyle(
                                              color: Colors.grey,
                                            ),
                                          ),
                                          SizedBox(
                                            height: 5,
                                          ),
                                          Column(children: List.generate(widget.order.foodOrders.length,(index) {
                                            return Text(
                                                '${widget.order.foodOrders[index].food.name}'
                                            );
                                          },),),
                                          Row(
                                            children: &lt;Widget&gt;[
                                              Column(crossAxisAlignment: CrossAxisAlignment.start,
                                                children: &lt;Widget&gt;[
                                                  Text('See details', style: TextStyle(fontWeight: FontWeight.bold,color: Colors.blue),),
  
                                                ],
                                              ),
  
  
                                            ],
                                          ),
  
                                        ],
                                      ),
                                    ),
                                    Padding(
                                      padding: const EdgeInsets.all(8.0),
                                      child: Column(
                                        children: &lt;Widget&gt;[
                                          SizedBox(height: 40,),
                                          Row(
                                            children: &lt;Widget&gt;[
                                              Icon(Icons.monetization_on),
                                              Text(widget.order.foodOrders
                                                  .first.price
                                                  .toString()),
                                            ],
                                          ),
                                        ],
                                      ),
                                    ),
                                  ],
                                ),
                              ),
                              elevation: 5,
                            ),
                          ],
                        ),
                    ),
                  ),
                ),
              )
  </code></pre>
  
  <p>and I also used a single child scroll view and column so that I can show my cards in that column of draggableScrollableSheet. But I want draggableScrollableSheet to take height dynamically instead of defining size. Like now I want to show only 2 to 3 cards and that is taking full screen. But I want it to take the minimum height of the screen. How can we achieve this?</p>