如何在容器背景图像中使用抖动设置资产图像

我知道如何在容器中设置图像文件。 但是,当我尝试在ListView中设置Container的背景时,无法显示图像。

Of course, I wrote these image files in pubspec.yaml.

      body: ListView(
        children: <Widget>[
          Container(
            decoration: BoxDecoration(
              image: DecorationImage(
                image: AssetImage('assets/images/IMG_01.JPG'),
                fit: BoxFit.cover,
              ),
            ),
          ),
          Container(
            decoration: BoxDecoration(
              image: DecorationImage(
                image: AssetImage('assets/images/IMG_02.JPG'),
                fit: BoxFit.cover,
              ),
            ),
          ),

给我建议。 谢谢。

评论