草庐IT

GreatVibes

全部标签

flutter - 如何使用 pubspec.yaml Assets 系列中指定的字体列表中的特定字体

假设我在pubspec.yaml文件中添加了以下几行字体:fonts:-family:GreatVibesfonts:-asset:fonts/GreatVibes-Regular.ttf-asset:fonts/GreatVibes-Bold.ttf我在我的应用程序中通过以下代码行使用它。newText('MyNewFont',style:newTextStyle(color:Colors.white,fontFamily:'GreatVibes',fontSize:16.0,)),我的问题是,在前面提供的两个.ttf文件中,flutter如何决定使用哪个文件?假设flutter决定

flutter - 如何使用 pubspec.yaml Assets 系列中指定的字体列表中的特定字体

假设我在pubspec.yaml文件中添加了以下几行字体:fonts:-family:GreatVibesfonts:-asset:fonts/GreatVibes-Regular.ttf-asset:fonts/GreatVibes-Bold.ttf我在我的应用程序中通过以下代码行使用它。newText('MyNewFont',style:newTextStyle(color:Colors.white,fontFamily:'GreatVibes',fontSize:16.0,)),我的问题是,在前面提供的两个.ttf文件中,flutter如何决定使用哪个文件?假设flutter决定