相关疑难解决方法(0)

我如何使用谷歌字体在颤振中定义主题

我是扑的新手。

我安装了这个库以便能够使用谷歌字体。

现在我需要在主题数据定义中这样做,并尝试这样但不允许

ThemeData appTheme() {
  return ThemeData(
    ...
    fontFamily: GoogleFonts.openSans(),
  );
}
Run Code Online (Sandbox Code Playgroud)

我该怎么做呢?非常感谢

fonts flutter google-fonts

6
推荐指数
3
解决办法
2596
查看次数

标签 统计

flutter ×1

fonts ×1

google-fonts ×1