Open lesnitsky opened 5 years ago
Add the font files to your assets directory let's say
assets
assets/fonts/NexaLight.ttf
Import the font in pubspec.yaml
pubspec.yaml
flutter: fonts: - family: NexaLight fonts: - asset: fonts/NexaLight.ttf - asset: fonts/NexaLight-Bold.ttf weight: 700
Use it in your flutter application
Text( 'Nexa Light sample', style: TextStyle(fontFamily: 'NexaLight'), );
Add the font files to your
assets
directory let's sayImport the font in
pubspec.yaml
Use it in your flutter application