1、添加引用
在 pubspec.yaml文件中,加入 font awesome的引用
dependencies:
flutter:
sdk: flutter # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1. #font awesome icon 这行是新加的
font_awesome_flutter: 8.2.
点击该文件上方的 Packages Get链接。
2、使用
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
Icon(FontAwesomeIcons.solidCircle)