Kaung Phyo Wai
Kaung Phyo Wai

Reputation: 61

How to change the shape of app icon in flutter?

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?

Upvotes: 2

Views: 8370

Answers (4)

rakib nadeem
rakib nadeem

Reputation: 1

After you generate your app icons from: https://appicon.co/, simply replace all folders contained in zip for android with the already existing folders in res directory .

Then go to app>src>main>res Right-click on res and select new> image asset. Adjust the icon to how you want it to appear.

Upvotes: 0

Atik Faysal
Atik Faysal

Reputation: 51

Yes you can do that. But you need to have sdk higher than 26. https://www.youtube.com/watch?v=hpQenyqxTmw

Upvotes: 1

littleironical
littleironical

Reputation: 1914

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

Upvotes: 4

hisam
hisam

Reputation: 1628

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.

Upvotes: 2

Related Questions