问题描述
assets
test.jpeg
我也包含在我的 pubspec.yaml
Flutter:
assets:
- assets/test.jpeg
FlutterLoader loader = FlutterInjector.instance().FlutterLoader();
String key = loader.getLookupKeyForAsset("assets/test.jpeg");
现在,基于此:我需要解码以整数作为参数的资源
Bitmap bmp = BitmapFactory.decodeResource(mContext.getResources(),what will I put here...);
在安卓中我可以这样做:
Bitmap bmp = BitmapFactory.decodeResource(mContext.getResources(),R.drawable.test.jpeg);
基于这个答案here
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)