How to add more items in Flutter body


I’m learning Flutter and right now I’m calling _buildStackCardsList widget in the body but I’m trying to add additional text right above _buildStackedCardsList method but I’m not really sure how to implement that. every time I tried to wrap with containers or columns the stackedCard got to disappear.

  body: _buildStackedCardsList()

  Widget _buildStackedCardsList() {

so this is what I trying to do

enter image description here

any suggestion, thanks


Flutters widget reference is a nice place to start when looking what widgets you can use and how you can implement your layout with it:

Judging from your wireframe I would add a Column widget

body: Column(
  children: <Widget>[
    Text('Your Text'),
    Expanded(child: _buildStackedCardsList()),

Update: Due to size calculation you can not render a ListView as a direct child of Column. It can be for example wrapped in a Expanded widget. The answer to a similar question can be found here:

Answered By – Dimitri L.

Answer Checked By – Timothy Miller (FlutterFixes Admin)

Leave a Reply

Your email address will not be published.