Flutter, fetching google_fonts at runtime via HTTP even in release mode
When you just get that once. this should be work.means your project must not running .you must stop running then pub get
.
Bensal
Updated on December 26, 2022Comments
-
Bensal over 1 year
If i'm right,
google_fonts
plugin loads font throughhttp
duringdebug
. Later when our app is ready we have to download the font from the fonts.google.com . and store it inpubsec.yaml
.I am developing a flutter application where all the available fonts should be shown to the users. But if i can't fetch it in the runtime, i will have to download every file, which counts over a thousand. It might become difficult as my app size increases and i will have to manually download them all.
So my question is, can i fetch it in the runtime , or is there some other way to achieve it? Hope someone can answer me. Thank You
edit: It ran without problems. The problem was not with google_fonts, my code was not reflecting changes, so i got wrong release apk
-
PRATIK PAWAR over 3 yearsadd internet permission in android, google fonts will work fine in release mode
-
Bensal over 3 yearsi added it, but did not work without downloading it and adding it to asset in pubsec.yaml
-
Bensal over 3 yearsIt was another error which was not related to google_fonts. The code was not updated so i got wrong release apk
-