ListView with Images from the Internet

This Article is posted by seven.srikanth at 04-06-2019 05:42:50

This Flutter example will help you to create a ListView with images. Inorder to try this example, all you need to do is to copy paste the below code into main.dart file of your freshly created flutter project.

The final output of this example is as below,

Full code from main.dart

import 'package:flutter/material.dart';

void main() {

class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
final title = "ListView List";
List<Choice> choices = const <Choice>[
const Choice( title: 'MacBook Pro', date : '1 June 2019', description: 'MacBook Pro (sometimes abbreviated as MBP) is a line of Macintosh portable computers introduced in January 2006 by Apple Inc.', imglink:''),
const Choice(title: 'MacBook Air', date : '1 June 2016', description: 'MacBook Air is a line of laptop computers developed and manufactured by Apple Inc. It consists of a full-size keyboard, a machined aluminum case, and a thin light structure.', imglink:''),
const Choice(title: 'iMac', date : '1 June 2019', description: 'iMac is a family of all-in-one Macintosh desktop computers designed and built by Apple Inc. It has been the primary part of Apple consumer desktop offerings since its debut in August 1998, and has evolved through seven distinct forms.', imglink:''),
const Choice(title: 'Mac Mini', date : '1 June 2017',description: 'Mac mini (branded with lowercase "mini") is a desktop computer made by Apple Inc. One of four desktop computers in the current Macintosh lineup, along with the iMac, Mac Pro, and iMac Pro, it uses many components usually featured in laptops to achieve its small size.', imglink:''),
const Choice(title: 'Mac Pro', date : '1 June 2018',description: 'Mac Pro is a series of workstation and server computer cases designed, manufactured and sold by Apple Inc. since 2006. The Mac Pro, in most configurations and in terms of speed and performance, is the most powerful computer that Apple offers.', imglink:''),

return MaterialApp(
title: title,
home: Scaffold(appBar: AppBar(
title: Text(title),
body: new ListView(
shrinkWrap: true,
padding: const EdgeInsets.all(20.0),
children: List.generate(choices.length, (index) {
return Center(
child: ChoiceCard(choice: choices[index], item: choices[index]),

class Choice {
final String title;
final String date;
final String description;
final String imglink;

const Choice({this.title,, this.description, this.imglink});

class ChoiceCard extends StatelessWidget {
const ChoiceCard(
{Key key, this.choice, this.onTap, @required this.item, this.selected: false}
) : super(key: key);
final Choice choice;
final VoidCallback onTap;
final Choice item;
final bool selected;

Widget build(BuildContext context) {
TextStyle textStyle = Theme.of(context).textTheme.display1;
if (selected)
textStyle = textStyle.copyWith(color: Colors.lightGreenAccent[400]);
return Card(
color: Colors.white,
child: Column(
children: <Widget>[
new Container(
padding: const EdgeInsets.all(8.0),
new Container(
padding: const EdgeInsets.all(10.0),
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(choice.title, style: Theme.of(context).textTheme.title),
Text(, style: TextStyle(color:,
crossAxisAlignment: CrossAxisAlignment.start,


Tags: Flutter example will help you to create a ListView with images; Mobile App with ListView and Images; ListView with Images on Mobile App;

Login to comment.
Recent Comments

Be the first to Comment. You can ask a Query or Share your toughts or Just say thanks.

Recent Articles

How to deploy flutter web site on GitHub using peanut

Posted by nikhilchaudhary12155 on 13 Oct 2019 Article

AnimatedPositioned Widget Example in Flutter

Posted by seven.srikanth on 10 Oct 2019 Article

Flutter Open-Source and directory lists

Posted by nishantkotatech on 09 Oct 2019 Article

Flutter Travelling Couple Leading Page - Flutter Web Series 3

Posted by nikhilchaudhary12155 on 05 Oct 2019 Article

© 2018 - Fluttercentral | Email to me -