Skip to content

Instantly share code, notes, and snippets.

@NITIN-ME
Created May 29, 2020 08:06
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 NITIN-ME/aade020bdb7467831eccb4a7d01a8f85 to your computer and use it in GitHub Desktop.
Save NITIN-ME/aade020bdb7467831eccb4a7d01a8f85 to your computer and use it in GitHub Desktop.
class ShowListView extends StatelessWidget {
final List<DataPoint> timeline;
ShowListView(this.timeline);
@override
Widget build(BuildContext context) {
print(timeline.length);
print("\n\n");
return ListView.builder(
itemCount: timeline.length,
itemBuilder: (context, index){
return Column(
children: <Widget>[
ListTile(
leading: Text("${timeline[index].date}"),
title: Center(child: Text("Total Cases: ${timeline[index].num}")),
),
Divider(),
]
);
}
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment