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: list widget flutter
ListView(
padding: const EdgeInsets.all(8),
children: <Widget>[
Container(
height: 50,
color: Colors.amber[600],
child: const Center(child: Text('Entry A')),
),
Container(
height: 50,
color: Colors.amber[500],
child: const Center(child: Text('Entry B')),
),
Container(
height: 50,
color: Colors.amber[100],
child: const Center(child: Text('Entry C')),
),
],
)
Example 4: how to make reusable widget in flutter
Widget buildListContainer(BuildContext context,Widget list) {
return Container(
height: 300,
child: ,
);
}
Example 5: 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
]),