flutter listview in container code example

Example 1: listview inside column flutter

new Column(
  children: [
    new Expanded(
      child: horizontalList,
    )
  ],
);

Example 2: flutter listview

ListView(
  padding: const EdgeInsets.all(8),
  children: [
    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')),
    ),
  ],
)

Tags:

Misc Example