Created
May 29, 2020 08:06
-
-
Save NITIN-ME/aade020bdb7467831eccb4a7d01a8f85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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