How to add images to the Flutter project

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Create an image folder inside an assets folder, create assets if not exist.

Flutter Image_directory

This should be in your root folder, in that same root directory you will find a pubspec.yaml file ,

pubspec.yaml

your need to make some changes on this file open it in your vscode editor, and change some lines like shown below.

To this

after this just use your images in your code after including child image function.

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x