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],
},
);
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: