用于 Flutter 的 Font Awesome 可重用小部件
Font Awesome Reusable Widget for Flutter
我对我正在尝试创建的适用于 Flutter 的可重用字体很棒的小部件有疑问。
我在 Android Studio 中为 Windows 收到一个错误,“方法 'FaIcon' 没有为类型 'IconContent' 定义。”
以下是我如何设置可重复使用的小部件。我找到了这个建议,但不确定如何实施:“为 IconData 使用 FaIcon Widget + FontAwesomeIcons class”
https://gist.github.com/countrymusicfy/3c5aa155063b49bf5d07e89241bc637b
如有任何建议,我们将不胜感激!
您缺少导入语句
你应该在 pubspec.yaml 文件和你的 dart 文件中都包含。
在您的 dart 文件中添加导入语句
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
添加对您的 pubspec.yaml
的依赖
dependencies:
font_awesome_flutter: ^9.1.0
我对我正在尝试创建的适用于 Flutter 的可重用字体很棒的小部件有疑问。
我在 Android Studio 中为 Windows 收到一个错误,“方法 'FaIcon' 没有为类型 'IconContent' 定义。”
以下是我如何设置可重复使用的小部件。我找到了这个建议,但不确定如何实施:“为 IconData 使用 FaIcon Widget + FontAwesomeIcons class”
https://gist.github.com/countrymusicfy/3c5aa155063b49bf5d07e89241bc637b
如有任何建议,我们将不胜感激!
您缺少导入语句
你应该在 pubspec.yaml 文件和你的 dart 文件中都包含。
在您的 dart 文件中添加导入语句
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
添加对您的 pubspec.yaml
的依赖dependencies:
font_awesome_flutter: ^9.1.0