第一次将字体导入pubspec.yaml文件中,并且效果很好,两天后字体家族中的相同代码出现错误

问题描述

this is my pubspec.yaml file . on left you can see the font file. On first try it works normally now the same code gives an error.

This is the main file where I used the font Font-family

this is my error message and my app doesn't open

解决方法

  1. 检查pubspec.yaml中的缩进是否正确

  2. 在终端中运行flutter clean,然后重建项目