Display Network Image in Flutter

flutter-network-image
flutter-network-image

In this article, we’re going to learn, how to display images from a network in your flutter app.

Getting Started

First, create a new project & change your working directory

flutter create testproj
<span class="hljs-built_in">cd</span> testproj

To display network Image, you need to use a widget called Image.network() It requires src and other properties as optional.

Image.network("URL", height: 200, width:200)

Display network image Example

Scaffold(
    body: Container(
     child: Center(
      child: Image.network(
       "https://codesundar.com/wp-content/uploads/2020/08/78494341_2774884842574595_7784880823911579648_n-300x300.jpg",
       height: 100,
       width: 100,
      ),
    ),
  ),
)
display network image
display network image