项目中引用一些本地资源图片时,出现以下错误
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中进行声明:
字体也是需要在这里声明:
example
style: TextStyle(
fontSize: 16,
letterSpacing: 3,
fontFamily: 'Farrington',
color: Colors.white,
),