1

I downloaded a font and placed it in assets.

pubspec.yaml

fonts:
    - family: Noor Regular
      fonts:
        - asset:assets/fonts/noorehuda-Regular.ttf

Error:

Error detected in pubspec.yaml:
Expected "fonts" to be a list of maps.
Irfan Y
  • 1,242
  • 2
  • 21
  • 68
  • I think your formatting is a little bit of. Please take a look at this: https://flutter.dev/docs/cookbook/design/fonts – Andrej May 23 '21 at 20:40

1 Answers1

1
fonts:
    - family: Noor Regular
      fonts:
        - asset: assets/fonts/noorehuda-Regular.ttf

The formatting is incorrect. give a space b/w asset: assets/...

lepsch
  • 8,927
  • 5
  • 24
  • 44