Finished Section 11
This commit is contained in:
parent
2ad472f055
commit
c001a836db
@ -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)
|
Loading…
Reference in New Issue
Block a user