首页 > 解决方案 > 如何在颤振中添加图像

问题描述

我在添加图像时遇到问题...我的代码是

 child: Column(
             
                children: [
                Image.asset('assets/logo.jpg'),
                Text('This is SplashScreen')
]
),

但还没有工作..我还启用了 pubspec.yamel assets commnet 但没有改变任何东西

标签: imageflutter

解决方案


确保您在主树中有一个资产文件夹,而不是嵌套在另一个文件夹中。


推荐阅读