Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some Icons gets out of its box constraints #45

Open
AlaaEldeenYsr opened this issue Jul 7, 2020 · 2 comments
Open

some Icons gets out of its box constraints #45

AlaaEldeenYsr opened this issue Jul 7, 2020 · 2 comments

Comments

@AlaaEldeenYsr
Copy link

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

@ElZombieIsra
Copy link

ElZombieIsra commented Jul 28, 2020

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

@wyatthoffman4392
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants