Skip to content

Instantly share code, notes, and snippets.

@NITIN-ME

NITIN-ME/main.dart

Created May 29, 2020
Embed
What would you like to do?
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