【发布时间】:2021-10-19 06:45:11
【问题描述】:
我想要 TextStyle / fontSize 来简化我的应用程序。
为此,有必要将行“
fontSize: Get.width * .030,
" 附上可用的代码,类似颜色"
{颜色颜色 = Colors.white}
这是我要自定义的代码...
TextStyle _textStyle({Color color = Colors.white}) {
return GoogleFonts.getFont(
'Unica One',
fontSize: Get.width * .030,
color: color,
letterSpacing: 0.5,
);
}
它应该看起来像这样,但不幸的是我不知道如何正确地将它组合在一起
TextStyle _textStyle({Color color = Colors.white}{FontSize fontSize = Get.width * .030}) {
return GoogleFonts.getFont(
'Unica One',
fontSize: fontSize,
color: color,
letterSpacing: 0.5,
);
}
【问题讨论】: