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:
- assets/images/
- assets/images/Home/