image pubspec
I want to set Noir Pro
as the default font family for my flutter app.
Default Roboto fontFamily changes to NoirPro but the font weights e.g(.w400,w500,w600)
are not working correctly . I'm unable to find any other online help. And this is getting me frustrated
In pubspec.yaml
fonts:
- family: NoirPro
fonts:
- asset: resources/fonts/NoirPro_Light.ttf
weight: 300
- asset: resources/fonts/NoirPro_Normal.ttf
weight: 400
- asset: resources/fonts/NoirPro_Medium.ttf
weight: 500
- asset: resources/fonts/NoirPro_Bold.ttf
weight: 700
- asset: resources/fonts/NoirPro_Heavy.ttf
weight: 800
In main.dart
theme: ThemeData(
fontFamily: 'NoirPro',
canvasColor: Colors.white,
),