最近,我能够通过使用Material Design Icons在Flutter中动态加载flutter_icons/flutter_icons.dart
// First Approach
Icon icon = new Icon(Icons.settings);
// Second Approach
icon = new Icon(MaterialIcons.getIconData(Model.dynamic_icon_name);
这让我开始思考是否可以使用本机android方法做类似的事情
// Glide Theoretical Example
Glide.with(context.getapplicationContext())
.asBitmap()
.load(MaterialIcons.getIconData(Model.dynamic_icon_name))
.apply(new RequestOptions().fitCenter())
.into(iconView);
我想知道这很有趣,因为我认为它可以提供一些优势,即开发人员无需将这些资产与应用捆绑在一起