polyicon icon indicating copy to clipboard operation
polyicon copied to clipboard

some Icons gets out of its box constraints

Open AlaaEldeenYsr opened this issue 4 years ago • 2 comments

Image for the issue image

I tried to use flutter_svg package https://pub.dev/packages/flutter_svg and it displayed the same icon well, so i think this is an issue from the flutter_icon website

AlaaEldeenYsr avatar Jul 07 '20 08:07 AlaaEldeenYsr

I have the same problem.

I've been doing some research and it seems like the problem is that the font generated is not completely squared so when Flutter renders the icon (the generated font), the icon overflows, and the overflow is shown by Flutter. You can try this if you add textDirection: TextDirection.rtl in your icon and it will overflow the other way.

The only way I see we could fix this is by making all the characters generated in the font completely squared, so the icons never overflow, being completely centered.

Edit: I'm realizing now that even on the page you can notice the error on your icons when you go to the "names" tab.

Captura de Pantalla 2020-07-28 a la(s) 6 31 28 p m

Edit 2: Custom Icon Widget

For anyone interested, I made a custom implementation of the Icon widget that solves the problem that Flutters Icon widget have and wraps the overflow of the icon. You can try it out here

ElZombieIsra avatar Jul 28 '20 23:07 ElZombieIsra

@ElZombieIsra Thank you for the workaround class that is great! However a fix for this would still be very nice from the code owners.

wyatthoffman4392 avatar Feb 09 '21 23:02 wyatthoffman4392