-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong icon preview shown for CupertinoIcons.location #3997
Comments
Looks like this was a previous bug in Flutter that was fixed in flutter/flutter#101923, but the icons in tools_metadata haven't been updated since. The tools_metadata icons will need regenerating and shipping in VS Code. @stevemessick FYI - not sure if this affects IntelliJ. I'll send a PR to tools_metadata shortly. |
There are also some additional missing icons like solar_power that were added in flutter/flutter#100885. Opened #3998 about that. |
Thanks @DanTup I'm planning to update colors and icons in the upcoming release. For background, the IntelliJ plugin does read the icons from the *.ttf or *.otf file. However, the Flutter 3.0 files have a lot of problems, so I'm going to revert to using the previews from tools_metadata for version 3.0 and up. At least until I get some time to look into what the cause of those problems is. It might be I have a bug to fix, but I suspect the Java code that reads the files isn't working. |
With each new release the size of the icons I include grows, and it re-reminds me that we need a better way to handle this in the SDK, but I still haven't come up with a particularly good solution. |
I think the big stumbling block is reading the font file to create glyphs for icons. Java and Flutter have built-in support for that, but Dart does not. Flutter uses native code in its Sky engine. We'd either have to add support to Dart to read *.otf and *.ttf files (Material uses OTF and Cupertino uses TTF), or implement a Dart package to read font files and create glyphs. I have no idea how hard that would be, but given that everyone else seems to use C++ to do it, I don't expect it to be easy. However, if we had that then it would be fairly straight-forward. The IntelliJ plugin has code to create icon previews that could be used to help design the analyzer version. Of course, it works with the IntelliJ PSI tree and the analyzer has its own version of syntax tree, but the concepts are similar (IIRC, it has been awhile since I looked at the analyzer). |
Yeah, there was some discussion about having I'll think a bit more about this and may try to revive some discussion on dart-lang/sdk#47667. Thanks! |
See flutter/flutter#104973:
The text was updated successfully, but these errors were encountered: