上一篇博客正好用到了本地的图片,记录一下用法:
首先新建一个文件夹,这个文件夹要跟目录下
然后在pubspec.yaml里面声明出来(- 后面有个空格)
最后就是使用了:
new AssetImage('images/timg.jpg')