项目中引用一些本地资源图片时,出现以下错误
flutter: Image provider: AssetImage(bundle: null, name: "assets/pics/bank_zs.png")
flutter: Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#aebb1(), name: "assets/pics/bank_zs.png",
flutter: scale: 1.0)
解决:
需要在pubspec.ymal中进行声明:
截屏2021-01-14 下午2.07.32.png
字体也是需要在这里声明:
截屏2021-01-14 下午2.44.21.png
example
style: TextStyle(
fontSize: 16,
letterSpacing: 3,
fontFamily: 'Farrington',
color: Colors.white,
),