Flutter ListView.Builder() in scrollable Column with other widgets

前端 未结 12 642
情书的邮戳
情书的邮戳 2020-12-24 10:58

I have a TabBarView() with an amount of different views. I want of them to be a Column with a TextField at top and a ListView.Builder() below, but both widgets should be in

12条回答
  •  我在风中等你
    2020-12-24 11:38

    Here is the solution:

    SingleChildScrollView(
            physics: ScrollPhysics(),
            child: Column(
              children: [
                 Text('Hey'),
                 ListView.builder(
                    physics: NeverScrollableScrollPhysics(),
                    shrinkWrap: true,
                    itemCount:18,
                    itemBuilder: (context,index){
                      return  Text('Some text');
                    })
              ],
            ),
          ),
    

提交回复
热议问题