Ahmadre / FlutterIconPicker

An adaptive comprehensive IconPicker for Flutter
MIT License
112 stars 76 forks source link

[How To] Create Map<String, IconData> from a custom IconData class? #12

Closed pranjal-joshi closed 3 years ago

pranjal-joshi commented 3 years ago

Hello, I want to use this LineIcons as a custom icon font in flutter icon picker. The showIconPicker method accepts a Map<String, IconData> customIconPack argument, However, I want to use this LineIcons class as it is. Manually converting all of the values from this LineIcons class into a map will be a tedious process! Is there any way to convert this LineIcons class into the required map on the fly? Or any alternative to use this class with icon picker?

Ahmadre commented 3 years ago

There's no flutter batch for now. But if you like to crate a flutter batch for creating a Map<String, IconData>, I would love to see any PR's :).

But to explain you how it worked for the existing ones: It's just simple REGEX. And with simple, I really mean simple. You just have to research how to regex that for LineIcons (because not all Icon-Packages are implemented in the same way). If you do it right, you'll convert the existing dart file in one minute to your needed file.

Ahmadre commented 3 years ago

Important note: LineIcons is Line Awesome. You can find it here: https://ahmadre.com/#/iconpicker

It's already built in in this packages 👍

pranjal-joshi commented 3 years ago

Important note: LineIcons is Line Awesome. You can find it here: https://ahmadre.com/#/iconpicker

It's already built in in this packages 👍

Yes, I have tried inbuilt Line Awesome icons.. but the LineIcons class offers a lot more icons than the default LineAwesome.. Is there any way to update built in LineAwesome font?

Ahmadre commented 3 years ago

Important note: LineIcons is Line Awesome. You can find it here: https://ahmadre.com/#/iconpicker

It's already built in in this packages 👍

Yes, I have tried inbuilt Line Awesome icons.. but the LineIcons class offers a lot more icons than the default LineAwesome.. Is there any way to update built in LineAwesome font?

Oh perfect, then I'll update the package. That's my responsibility :).

Will notify you here for an update 👍🏼

Ahmadre commented 3 years ago

@pranjal-joshi Update is coming and finished already, but we have to wait for this: https://github.com/galonsos/line_icons/issues/12

Ahmadre commented 3 years ago

@pranjal-joshi As this issue is not anymore related to the base question (which was already answered), please track the Issue on Line_Icons. It seems to be a bug there.

Ahmadre commented 3 years ago

Update: LineAwesome updated it's icons to the newest as it seems :):

Bildschirmfoto 2020-10-26 um 12 25 36