在flutter中使用图片资源,报错:Expected "assets" to be a list, but got -assets/images/lakes.png (String).
image.png
异常原因:在pubspec.yaml文件配置图片资源的时候, -assets/images/lakes.png assets前少空格
添加就可以了
image.png
在flutter中使用图片资源,报错:Expected "assets" to be a list, but got -assets/images/lakes.png (String).
异常原因:在pubspec.yaml文件配置图片资源的时候, -assets/images/lakes.png assets前少空格
添加就可以了
本文标题:Expected "assets" to be a list,
本文链接:https://www.haomeiwen.com/subject/tpklcctx.html
网友评论