listview.builder inside column flutter code example
Example 1: scroll column with listview
SingleChildScrollView(
physics: ScrollPhysics(),
child: Column(
children: <Widget>[
Text('Hey'),
ListView.builder(
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount:18,
itemBuilder: (context,index){
return Text('Some text');
})
],
),
),
Example 2: listview inside column flutter
new Column(
children: <Widget>[
new Expanded(
child: horizontalList,
)
],
);
Example 3: pageview inside column flutter
Column(
children: <Widget>[
Expanded(
flex: 1,
child: PageView(children: <Widget>[
Text('Page 1'),
Text('Page 2'),
Text('Page 3'),
]),
),
Expanded(child: Text("Test"), flex: 10), #<- add this if you don't want it to be at the bottom of the page
]),