Ahmadre / FlutterIconPicker

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

serializeIcon returns wrong key #23

Closed QuentinG3 closed 3 years ago

QuentinG3 commented 3 years ago

Hi,

I am using flutter_iconpicker version 3.0.1+2. When using the method serializeIcon using the material pack I am not getting the correct key as output. If using serializeIcon and deserializeIcon in chain I get the same IconData. However if I only use serializeIcon and check the store result in data base I do not get the correct Key.

For instance:

Example (serializeIcon)

Thank you !

Ahmadre commented 3 years ago

This is related to constant changes from Flutter MaterialIcons. They changed the codePoints and that leads to inconvinience in other packsges.

As you already mention if you serialize and deserialze everything is fine, therefore because the Flutter Team always changed the codePoints our serialization is handling this. So don't worry if you see other keys in your db.

But I'll update the MaterialIcon Map so the keys are correct in the DB.

I hope this Flutter Team will not change the codePoints again, otherwise we'll have to find another way rather then mapping...

Ahmadre commented 3 years ago

I also know where I cause issue is. I'll fix this now

Ahmadre commented 3 years ago

Fixed with v. 3.0.2

Please update and thanks for using my package 💙