gpt4 book ai didi

flutter - Flutter 中字体 -> 样式的无效值样式 ((String))

转载 作者:行者123 更新时间:2023-12-01 23:43:04 26 4
gpt4 key购买 nike

在 pubspec.yaml 中添加自定义字体样式给出

Error detected in pubspec.yaml:
Invalid value Bold ((String)) for font -> style.
Please correct the pubspec.yaml file at /Users/directory/pubspec.yaml

这里是 pubspec.yaml 中的代码

  fonts:
- family: Gilroy
fonts:
- asset: fonts/gilroy_bold.ttf
style: Bold
- asset: fonts/gilroy_bolditalic.ttf
weight: 900
- asset: fonts/gilroy_medium.ttf
weight: 700

最佳答案

你想要这个。

  fonts:
- family: Gilroy
fonts:
- asset: fonts/gilroy_bold.ttf
weight: 700
- asset: fonts/gilroy_bolditalic.ttf
weight: 700
style: italic
- asset: fonts/gilroy_medium.ttf
weight: 500

关于flutter - Flutter 中字体 -> 样式的无效值样式 ((String)),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64711822/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com