ScerIO / icon_font_generator

☣️ Flutter Icon Font Generator
https://pub.dev/packages/icon_font_generator
Other
96 stars 50 forks source link

Make icon class data non private #22

Closed Jupi007 closed 1 year ago

Jupi007 commented 2 years ago

It could be imo nice to not make the icon data class private to allow stuff like this:

Icon(UiIconsData(0xf101))

This allow for example to create a list of all icons by looping between a range of code point. I can make a PR if you want :)

Jupi007 commented 1 year ago

I found a very simple solution. If you need data class as non private, you just need to create this kind of class (same as the private one):

class IconsData extends IconData {
  const IconsData(int codePoint)
      : super(
          codePoint,
          fontFamily: 'Icons',
          fontPackage: 'icons',
        );
}

Closing this issue because this is not required in this tool :)