Closed axilos closed 3 years ago
Hi! Based on your screenshot, it looks like you didn't run flutter pub get
yet. Run it in your project root.
import 'package:flutter/widgets.dart';
is where the IconData
class lives. It should be green once you've done the step above.
search
is not underlined red for me, please check again after running flutter pub get
. If it's still there, please open another issue with the output of flutter doctor -v
.
Hi and thank you on your fast respond.
I'm still stuck...
I have pro icons and I have followed the guide:
`Download this package's newest release, extract the folder, move it to a location of your choice and go to that directory Remove #s from pubspec.yaml at the indicated position run flutter packages get Download your font awesome pro icons (web version) Move all .ttf files from the webfonts directory to /path/to/your/font_awesome_flutter/lib/fonts (replace existing fonts) Note: Please make sure all .ttf files (and the following icons.json) are of the same version to avoid missing icons! Move icons.json from metadata to /path/to/your/font_awesome_flutter From there run ./tool/update.sh on linux or .\tool\update.bat on windows Note for windows users: Please run the script in cmd or powershell only. Flutter is known to have problems with third-party shells. Add version >= 4.7.0 to your project's dependencies, Override it with the path to your local installation: dependencies: font_awesome_flutter: '>= 4.7.0' ...
dependency_overrides: font_awesome_flutter: path: /path/to/your/font_awesome_flutter ...`
I did it step by step strictly. Only I had to move update.bat from /tool directory to /font_awesome_flutter directory. font_awesome_flutter directory is in the project root. I copied it from the git as newest release. I did pub get on main pubspec.yaml and on pubspec.yaml in /font_awesome_flutter directory. Copied fonts with overwritting 3 of them.
Update is done without any errors ("Custom icons.json found, using local data only.").
And I have still same error in font_awesome_flutter.dart file inside /font_awesome_flutter/lib.
Icons.dart now has 13866 errors:
It says ExampleIcon is not defined.
I found the cause of the problem.
In icons.json there is a field "360-degrees" and it is generated into: static const IconData 360Degrees = const IconDataRegular(0xe2dc);
Variable name can't start with number...
This causes whole big file font_awesome_flutter to popup errors "IconData isn't a type".
I have renamed "360-degrees" into "degrees-360" and start update again.
P.S. FontAwesomeIcons.search icon not exist and it is used in example/lib/main.dart, row 103.
In font_awesome_flutter.dart all IconData are marked with error: 'IconData' isn't a type.
For example, this line: static const IconData zero = const IconDataRegular(0x30);
Other notices:
import 'package:flutter/widgets.dart'; is greyed out.
Also in example/lib/main.dart: icon: FaIcon(FontAwesomeIcons.search), 'search' is underlined red (The getter 'search' isn't defined for the type 'FontAwesomeIcons'.)
example/lib/icons.dart is also underlined red but inside the file there is nothing marked. 'Analysis completed 6 errors found 716 typos found'![Screenshot_1](https://user-images.githubusercontent.com/1719544/119959958-c4122f80-bfa4-11eb-8835-2a0b00611d68.png)