Complete example

Fonts

The Raleway and RobotoMono fonts were downloaded from
Google Fonts.

pubspec.yaml

name

package_fonts

description

An example of how to use package fonts with Flutter

dependencies

awesome_package

flutter

sdk

flutter

dev_dependencies

flutter_test

sdk

flutter

flutter

fonts

family

Raleway

fonts

asset

packages/awesome_package/fonts/Raleway-Regular.ttf

asset

packages/awesome_package/fonts/Raleway-Italic.ttf

style

italic