description here
- open terminal in the lego project root directory, enter the following command for install cli. and create a new lego project if you don't have one.
flutter pub global activate lego_cli
lego create
- in terminal, enter the following command for add lego to project.
lego add theme_config_lego
you can set theme in lib/util/config/theme_config_lego/_.dart
file.
- add font files in
assets/lego/theme_config_lego
directory. example font is CaviarDreams.ttf already inside the directory. - add font in pubspec.yaml file.
flutter:
fonts:
- family: CaviarDreams
fonts:
- asset: assets/lego/theme_config_lego/CaviarDreams.ttf
- asset: assets/lego/theme_config_lego/CaviarDreams_Bold.ttf
- asset: assets/lego/theme_config_lego/CaviarDreams_Italic.ttf
- asset: assets/lego/theme_config_lego/CaviarDreams_BoldItalic.ttf
style: normal
- set font family name in
lib/util/config/theme_config_lego/_.dart
file lightTheme and darkTheme.
fontFamily: 'CaviarDreams',
- done!