我想在pubspec.yaml中更改字体系列,但是当我运行pub get时会发生什么并不是我所期望的。我就是这么做的..。
fonts:
- family: Parisienne
fonts:
- asset: assets/fonts/Parisienne-Regular.ttf
style: italic
weight: 70 在运行pub get之后我得到了什么
[creepy_ipad] flutter pub get
Error detected in pubspec.yaml:
Error on line 70, column 12: Mapping values are not allowed here. Did you miss a colon earlier?
╷
70 │ fonts:
│ ^
╵
Please correct the pubspec.yaml file at C:\Users\Khomotjo\creepy_ipad\pubspec.yaml
exit code 1我真的不知道该怎么办请帮帮忙。谢谢
发布于 2022-06-20 03:23:54
这是压痕问题。您的pubspec.yaml应该如下所示:
fonts:
- family: Parisienne
fonts:
- asset: assets/fonts/Parisienne-Regular.ttf
style: italic
weight: 70有关更多信息,请查看文档。
发布于 2022-06-20 04:46:28
您的风格和重量应该与资产保持一致。
例如:
fonts:
- asset: assets/fonts/Parisienne-Regular.ttf
<space> style: italic
<space> weight: 70 https://stackoverflow.com/questions/72681705
复制相似问题