我在flutter中使用了iconfont,但它不能正常工作。
它看起来像一个'X‘like this
我在pubsepc.yaml中定义它:
flutter:
uses-material-design: true
fonts:
- family: iconfont
fonts:
- asset: assets/fonts/iconfont.ttf我是这样使用它的:
MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('data'),),
body: Center(
child: Container(child: Icon(IconData(0xe60d,fontFamily: 'iconfont'),color: Colors.amber,size: 50.0,),)
),
),
),已经在iconfont.ttf中定义了"0xe60d“,我尝试将其替换为另一个已定义的图标,但它也没有用
谁能帮我?由衷的感谢
发布于 2018-12-29 17:22:24
使用这个工具生成你的图标字体:http://fluttericon.com/
https://stackoverflow.com/questions/53967600
复制相似问题