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

google_font is not loaded loadAppFonts() #158

Open
rddewan opened this issue Aug 16, 2022 · 1 comment
Open

google_font is not loaded loadAppFonts() #158

rddewan opened this issue Aug 16, 2022 · 1 comment

Comments

@rddewan
Copy link

rddewan commented Aug 16, 2022

By default google_font is stored in project root dir google_fonts but the GoldenToolkit is always loading the font from assets/fonts .
When using the google_fonts it is not required to enable fonts in pubspec.yaml file , we just have to add the google_fonts folder to assets.

solution :
create assets/fonts and add your google_font
Screen Shot 2565-08-16 at 3 50 09 PM

@coreysprague
Copy link
Contributor

@rddewan

the code for loading fonts is not terribly complex... have you tried writing a function to iterate over the font assets and loading them programmatically in your test setup?

I would happily accept a PR that introduces a new function to loadGoogleFonts(); but it is not something I'll probably prioritize for an enhancement in the near future otherwise.

github-merge-queue bot pushed a commit to SharezoneApp/sharezone-app that referenced this issue Jan 6, 2024
This PR converts the variables `lightTheme` and `darkTheme` to the
methods `getLightTheme()` and `getDarkTheme()`. The reason for this is
that in golden tests outside of `/app`, the `golden_toolkit` package is
unable to load our "Rubik" font (see
eBay/flutter_glove_box#158). With this method,
the golden tests can override the font family with a font like "Roboto".
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

2 participants