flutter06:使用iconfont字体

2019-06-17  本文已影响0人  蜗牛的学习方法

1、在阿里巴巴字体图标库下载一个iconfont.ttf字体
2、在项目根目录下建一个fonts文件夹,如以下图:


image.png

3、在pubspec.yaml文件下面引入iconfont.ttf文件


image.png
4、使用
Icon( IconData(0xe68f, fontFamily: 'iconfont'),color: Colors.blue,size: 89.0)
image.png
上一篇 下一篇

猜你喜欢

热点阅读