Text

"Hello"

font

Font

custom

"BungeeSpice-Regular"

size

40

In Flutter, you control your resources with a file
named pubspec.yaml. This file is platform agnostic.
To add a custom font to your project, follow these steps:

Create a folder called fonts in the project’s root directory.
This optional step helps to organize your fonts.

Add your .ttf, .otf, or .ttc font file into the fonts folder.

Open the pubspec.yaml file within the project.

Find the flutter section.

Add your custom font(s) under the fonts section.

    
 flutter:
   fonts:
     - family: BungeeSpice
       fonts:
         - asset: fonts/BungeeSpice-Regular.ttf