I have a package named Handwriter. It writes text in a custom font. I have the .ttf saved in lib/third_party/. In its pubspec.yaml, I add the font:
flutter:
uses-material-design: true
fonts:
- family: FancyHandwriting
fonts:
- asset: lib/third_party/FancyHandwriting-Regular.ttf
My app imports this package. In its pubspec.yaml, I add Handwriter as a dependency:
dependencies:
flutter:
sdk: flutter
handwriter:
path: ../handwriter
model:
path: ../model
However, the font does not show up at all when I use it in my app. Why?
final defaultStyle = TextStyle(
fontFamily: 'FancyHandwriting',
fontSize: 130);