Warm tip: This article is reproduced from serverfault.com, please click

Changing the icon "type" to "rounded" in Flutter

发布于 2020-12-04 06:44:30

I would like to know if there is a way to change the icon "type" in Flutter, not quite sure whats it called but i noticed that Flutter's material icon have different types, for examples: Icons.done, Icons.done_rounded, Icons.done_sharp

So in this case the type is "rounded" and "sharp", and if i'm not mistaken using Icons.done will have a default type of "sharp".

So i was wondering if we can change the default icon type to "rounded", like changing the default icon size using theme data.

Well currently one of the ways is adding the additional _rounded to every icon in my Flutter project, but i'm a very lazy person you see. :) Anyone can help?

Questioner
Sunn
Viewed
0
Er1 2020-12-04 16:40:03

No, there is no default option to set your icons to 'rounded' they are different svg images and have a different name. It is not a setting like icon size.

Check out https://material.io/resources/icons/?style=baseline for the full Icons list.

There are also a lot of 3rd party icon libs on pub.dev. I use https://pub.dev/packages/mdi a lot.