Flutter图片加载问题,Flutter: Unable to load asset Image provider: AssetImage(bundle: null, name: “assets/images/xx.jpg”)
解决方案:
依赖包添加文件目录路径(在pubspec.yaml文件里)
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
assets:

本文详细阐述了在Flutter中遇到的图片加载错误,焦点在于如何通过添加文件目录路径到pubspec.yaml来解决AssetImage:bundle:null,name:“assets/images/xx.jpg”的问题。
最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



