How to change the shape of app icon in flutter?

Viewed 3110

I am making an app icon in flutter. And I have a problem. I want to make my app icon with square shape. But I am just getting the circle shape icon.

The Icon I am trying to implement

The Icon I am getting

How can i change the shape of the icon?

3 Answers

You can't change the shape of app icon by coding.

So, what you can do is that:

  1. Make a circular icon with it's background transparent

  2. Save it and drag & drop that image file here

  1. Generate the icon, it will download a zip file
  2. Extract the android folder from that (other files are not necessary)
  3. Copy all the contents ("mipmap-" folders) from the android folder (it's basically the different icon sizes)
  4. Go to res folder in your project location -> F:\flutter\project_name\android\app\src\main\res
  5. And replace all mipmap- folder with the new one which has your created logo

This may help you

I think it's set up automatically by Google through Adaptive Icons.

So your app Icon will automatically change based on your device theme, setting, etc. You don't need to worry about that. All you need to do is provide a square app icon.

In your image, you can look at the YouTube icon. It's basically a square, but because it's adaptive (automatically as long as you set it up correctly), it could transform into several different shapes.

You can read more here, or here.

Related