nank1ro / flutter-shadcn-ui

shadcn-ui ported in Flutter. Awesome UI components for Flutter, fully customizable.
https://mariuti.com/shadcn-ui
MIT License
657 stars 42 forks source link

From Google Fonts #48

Closed dickermoshe closed 3 months ago

dickermoshe commented 3 months ago

Google Fonts & Flutter do not work together nicely at all. There are a bunch of problems with font weights. If there is gonna be a func named fromGoogleFonts, it would be really nice if it used all the workarounds to get it working correctly out of the box.

Mike Rystrom and Luke Pighetti would know the details.
I just know that every time I've used google_fonts I ran into bugs that the Flutter and Google Fonts team marked as wont fix.

nank1ro commented 3 months ago

Does these bugs happen even if you download the font locally and add it to the project? I don't know about which bugs are you referring to, if you have a link to understand better what are the problem would help me a lot

dickermoshe commented 3 months ago

https://github.com/material-foundation/flutter-packages/issues/141 https://github.com/material-foundation/flutter-packages/issues/35

dickermoshe commented 3 months ago

No, they're due to the way google_fonts works

dickermoshe commented 3 months ago

https://github.com/material-foundation/flutter-packages/issues/35#issuecomment-1954054725

dickermoshe commented 3 months ago

If this is something the package can't handle, then adding docs for the func would be best. If a function is named fromGoogleFonts you would expect everything to work perfectly

nank1ro commented 3 months ago

what a strange bug, and the fact that this issue is open since 2019 it's even worse. This one seems the only workaround properly working, would check out. I don't know if I can really integrate here, would try now.

dickermoshe commented 3 months ago

Shorter syntax: https://github.com/material-foundation/flutter-packages/issues/35#issuecomment-1774974729

nank1ro commented 3 months ago

Thanks for the sharing. I think I made it working.

Screenshot 2024-03-24 at 17 12 49

Will release an update soon

dickermoshe commented 3 months ago

Thanks so much. Solid improvement.