ilikerobots / polyicon

Flutter icon set generator
http://fluttericon.com
MIT License
422 stars 49 forks source link

Custom FlutterIcon font is no longer showing icons, even in release mode. #81

Open codingiswhyicry opened 1 year ago

codingiswhyicry commented 1 year ago

This is a problem that showed up for me a couple of weeks ago, and I'm having trouble tracking it down. The codebase in question is a design system, so the custom icons are in a package that someone adds to their application.

Recently, the icons all stopped working, and showing up in release mode. Even when they are bundled and built for web (see here: https://withaureus.org/#/), the icon placeholders still show.

I have touched nothing that imports / exports anything related to the icons. I'm not sure if this is related to the FlutterIcons themselves, or if this is something to do with Flutter.

Here's the asset file in the package: https://github.com/Astra-Labs/Aureus/blob/main/Package/lib/src/Objects/Components/Icons.dart

Implementation of using icons: https://github.com/Astra-Labs/Aureus/blob/main/Example%20App/lib/src/Supporting/FillerData.dart

codingiswhyicry commented 1 year ago

Did a test with Material's icon library just to make sure it wasn't a fluke accident, but sure enough custom icons aren't rendering and Material ones are. I'll go through the process of deleting and re-adding my custom icons again, but I don't think that will solve the issue.

The icons were previously working, and I didn't move them in the file structure.

Screen Shot 2023-02-24 at 9 22 35 PM Screen Shot 2023-02-24 at 9 22 46 PM
ilikerobots commented 1 year ago

Thanks for the report. I'm sorry though, that there's likely not much chance I'm going to be able to look into this for about 2 weeks as I'm travelling. But I didn't want to say there hasn't been any releases that would affect this on the FlutterIcon side, so it is likely due to changes in Flutter or some other dep. If anyone can share some additional info, it would be appreciated.

codingiswhyicry commented 1 year ago

No worries! That's what I was imagining, and I'm planning on making a bug report in the Flutter repo. Some other details that may be helpful:

JCQuintas commented 1 year ago

I had to follow this guide for it to work. Pretty much adding my font under fonts: instead of assets:

https://docs.flutter.dev/cookbook/design/fonts

flutter:
  fonts:
    - family: Raleway
      fonts:
        - asset: fonts/Raleway-Regular.ttf
        - asset: fonts/Raleway-Italic.ttf
          style: italic
    - family: RobotoMono
      fonts:
        - asset: fonts/RobotoMono-Regular.ttf
        - asset: fonts/RobotoMono-Bold.ttf
          weight: 700