码迷,mamicode.com
首页 > 其他好文 > 详细

Flutter中集成Font Awesome

时间:2018-12-22 16:43:13      阅读:1098      评论:0      收藏:0      [点我收藏+]

标签:with   cat   depend   code   end   color   链接   pre   pac   

1、添加引用

在 pubspec.yaml文件中,加入 font awesome的引用

 

 1 dependencies:
 2   flutter:
 3     sdk: flutter
 4 
 5   # The following adds the Cupertino Icons font to your application.
 6   # Use with the CupertinoIcons class for iOS style icons.
 7   cupertino_icons: ^0.1.0
 8 
 9   #font awesome icon 这行是新加的
10   font_awesome_flutter: 8.2.0

点击该文件上方的 Packages Get链接。

2、使用

import ‘package:font_awesome_flutter/font_awesome_flutter.dart‘;

Icon(FontAwesomeIcons.solidCircle)

 

Flutter中集成Font Awesome

标签:with   cat   depend   code   end   color   链接   pre   pac   

原文地址:https://www.cnblogs.com/ybst/p/10161099.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!