Skip to content
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

Provide icon mapping #13

Open
davidpanic opened this issue Nov 4, 2020 · 1 comment
Open

Provide icon mapping #13

davidpanic opened this issue Nov 4, 2020 · 1 comment

Comments

@davidpanic
Copy link

Currently you have to specify your own map of key value pairs for all icons if you want to use a library that requires the icons to exist such as flutter_remote_icon. That could easily get desynchronized if the library updates.

If there was a Map<String, IconData> somewhere in the library you could simply do this and it would always be synchronized correctly with what the library provides:

//library code
const Map<String, IconData> communityMaterialIconsMap = {
  'ab_testing': CommunityMaterialIcons.ab_testing,
  'abjad_arabic': CommunityMaterialIcons.abjad_arabic,
  // The rest of the icons
}

// user code
XIcons.register(
  'community',
  {
    for (final iconName in communityMaterialIconsMap.keys) 'community://$iconName': communityMaterialIconsMap[iconName],
  },
);
@davidpanic
Copy link
Author

Wow. Great. Another completely dead flutter package! If you stopped maintaining this, MARK IT AS DISCONTINUED ON PUB.DEV There is a reason that checkbox exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant