flutter - iconfont:如何让iconfont在flutter中工作
问题描述
我在flutter中使用iconfont,但是不能正常使用,</h1>
它看起来像这样的“X ”
我在 pubsepc.yaml 中定义:</p>
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,),)
),
),
),
“0xe60d”已在 iconfont.ttf 中定义,我尝试将其替换为另一个定义的图标,但这也没用
谁能帮我?真诚的感谢
解决方案
使用此工具生成您的图标字体:http: //fluttericon.com/
推荐阅读
- android - 保存上次阅读位置
- node.js - 如何确保只有经过身份验证的用户才能读取 Azure 存储中的 blob?
- image-processing - state_dict 中缺少键
- javascript - 为什么这个词边界正则表达式没有按预期匹配?
- c# - Linq 如何帮助使用 List 方法
来自 IList 的类 参考持有清单 目的? - python - FOREIGN KEY 约束失败,django
- python - 如何将 UDP 数据包发送到我在 Python (3.7.3) 中创建的 UDP 服务器?
- php - 获取 OAuth 凭据时出错:“OAuthException:此授权码已被使用。”
- javascript - 我的问题是关于从量角器中的承诺块返回一个值
- reactjs - 反应如何创建自定义溢出省略号