Displaying Images

Images can have different usages and they can come from different places, so displaying images in Flutter varies depending on where you want to load the images and what you need to use them for.

There are two classes that are used for this purpose. One is the Image, which is a widget like a Text, an Icon, or any other widget you’ve seen until now. The other is the ImageProvider, which is needed when you need to specify an image and externally manipulate its size or shape.

An Image widget is a representation of the image and you can add it to an app’s layout anywhere, whereas the ImageProvider class is a source for an image and it is used to form widgets with that image.

Displaying Images from the Network

If you have a URL containing ...

Get Programming Flutter now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.