Finished Section 11

This commit is contained in:
Martin Donnelly 2020-02-12 13:40:33 +00:00
parent 2ad472f055
commit c001a836db

View File

@ -5,4 +5,42 @@ class ImageList extends StatelessWidget {
final List<ImageModel> images;
ImageList(this.images);
}
Widget build(context) {
return ListView.builder(
itemCount: images.length,
itemBuilder: (context, int index) {
return buildImage(images[index]);
},
);
}
Widget buildImage(ImageModel image) {
return Container(
decoration: BoxDecoration(
border: Border.all(color:Colors.black87),
),
margin:EdgeInsets.all(20.0),
padding:EdgeInsets.all(20.0),
child:Column(
children: <Widget>[
Padding(
child:Image.network(image.url),
padding:EdgeInsets.only(
bottom:15.0,
)
),
Text(image.title),
]
),
);
}
}
// Image.network(images[index].url);
// Image.network(image.url)