make listview widget in flutter code example
Example 1: flutter listview builder
List litems = ["1","2","Third","4"];
body: new ListView.builder
(
itemCount: litems.length,
itemBuilder: (BuildContext ctxt, int index) {
return new Text(litems[index]);
}
)
Example 2: listview flutter
Widget _myListView(BuildContext context) {
return ListView(
children: [
ListTile(
title: Text('Sun'),
),
ListTile(
title: Text('Moon'),
),
ListTile(
title: Text('Star'),
),
],
);
}