Hello, in this video, I am going to show you how to change the app icon for your application. This is going to handle the Android side, I've got a separate video covering the iOS side of the icon. So what you want to do is create a folder called assets. So you just right click your project, go to new directory and type in there, click OK. I've already got it done. So I'm not going to click, click OK. And in assets, put your your your icon for the one called icon dot png.
And it's literally just a YouTube icon in a world off the internet. And if I go to assets, there we go. So that's what we're going to replace our default flutter icon with. So what you want to do now is go to your pub spec dot yamo file in here. And under dev dependencies, you want to add a package dependency and this is flutter on the school launcher and install it columns, the latest version of auto create this video 0.70 if you want to know more about where you can find the latest version, go to pub dartlang.org for slash packages, search for the package in here and the package is launcher underscore icon and click on that and that is the latest version and you can let us copy this code okay so now what we want to do is next we need to actually specify the flutter icons motor on the small icons and we are going to put image underscore path and the path that I am going to specify to go going to be assets for slash icon dot png, whatever the path is, and then we say iOS on cruises just leave it alone true.
Well, if you want separate image paths for iOS and then you could have on the score by your West and then the one for image on school path on the score angle, and as you know, specify different icon but I'm happy with a single icon. Now at this stage, what you want to do is click packages get. This should only take a few seconds. Okay, we've not done what we need to actually do is open up terminal, or Command Prompt or whatever you've been using, and change directory to your flutter application. Now you want to run Nutter pub run. flutter on the score launcher on the score icons on name.
And this will just generate the file necessary for the Android side of it. Okay, and all us as well too. Okay, the next thing that we want to do is go to Android, right click it, go to new image assets. From here, you just select your image. Generally speaking of a foreground and a background, the foreground will be a little boys play icon. The background would be the red is specified the same for both so just do that.
And once you don't need to specify here, make sure everything else is the same. Click Next. That's fine. It's going to overwrite everything because I've already done you know this process. Yours will probably only cover a few red ones. Click Finish Now if we run our application Okay, so we'll just wait patiently for it to run.
Okay, so it's built, it's sinking in. And there we go. So if we go to the app menu, there we go. The flutter app now has this new YouTube I thought so that is how you replace the icon for the Android side. The next video, I'm going to cover the iOS side. If you have any questions about any of this or any other videos, feel free to drop me a message and as usual, I look forward to seeing you in the next video.