font_generator_cli 1.0.5
SDKdartflutter
Platformandroidioswindowslinuxmacos
A CLI and codegen tool to generate Flutter font styles and widgets.
Font Generator CLI
A Dart Build Runner Builder that auto-generates TextStyle and Text widget helpers from your custom font definitions and sizes.
Supports both Google Fonts and custom font families.
✨ Features
- Generate
TextStyleconstants for multiple fonts, weights, and sizes - Generate reusable
Textwidget helpers - Supports Google Fonts and custom font families
- Uses
build_runnerand reads from a simple YAML config
📦 Installation
In your Flutter project:
1. Add dependencies
dev_dependencies:
font_generator_cli:
path: ../font_generator_cli # or from pub.dev if published
build_runner: ^2.4.6
⚙️ Configuration
Create a file in the root of your project:
📄 font_generator.yaml
fonts:
- inter:GoogleFonts.inter
- roboto:GoogleFonts.roboto
- poppins:GoogleFonts.poppins
sizes: [8, 10, 12, 14, 16, 18, 20, 22, 24, 28, 32, 36]
output: lib/generated