In one of the mobile app I’m curently working on, I needed to use a google font as default in my theme data. Here is a simple way to set Nunito Google font (or any else Google Font you wanna use) as default font in the theme of your Flutter app.
First, define the family and styles you’ll need. In my case, I needed 5 styles, from light to extra-bold. Download the font from the official google font website here.
Then, unzip the selected files in the asset folder of your project, and add the path to these files in the pubspec.yaml file, like this :
Finally, add the font family in your theme file :
And that’s it, your app is now using the Nunito GoogleFont as default.