Skip to content

Instantly share code, notes, and snippets.

@vijayinyoutube
Created September 14, 2021 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vijayinyoutube/8b03feb399841ba9df9f922ed976ddbc to your computer and use it in GitHub Desktop.
Save vijayinyoutube/8b03feb399841ba9df9f922ed976ddbc to your computer and use it in GitHub Desktop.
Widget buildItems(dataList) => ListView.separated(
padding: const EdgeInsets.all(8),
itemCount: dataList.length,
separatorBuilder: (BuildContext context, int index) => const Divider(),
itemBuilder: (BuildContext context, int index) {
return ListTile(
title: Text(
dataList[index]["Name"],
),
subtitle: Text(dataList[index]["Dept"]),
trailing: Text(
dataList[index]["RollNo"],
),
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment