Skip to content

Instantly share code, notes, and snippets.

@slamdon
Created February 7, 2020 01:47
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 slamdon/a843acb5138e61e1675f710ca2090e88 to your computer and use it in GitHub Desktop.
Save slamdon/a843acb5138e61e1675f710ca2090e88 to your computer and use it in GitHub Desktop.
ListView
return MaterialApp(
title: title,
home: Scaffold(
appBar: AppBar(
title: Text(title),
),
body: ListView(
children: List.generate(images.length, (index) {
return Column(
children: <Widget>[
Container(
height: 300,
child: Image(
image: AssetImage('assets/' + images[index]),
fit: BoxFit.fill,
),
),
Container(
child: Center(
child: Text(images[index],
style: TextStyle(fontSize: 20))),
height: 50,
decoration: BoxDecoration(color: Colors.amber),
)
],
);
}),
)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment