Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 如何在颤振中制作可调图像容器_Flutter_Dart_Flutter Layout_Flutter Animation - Fatal编程技术网

Flutter 如何在颤振中制作可调图像容器

Flutter 如何在颤振中制作可调图像容器,flutter,dart,flutter-layout,flutter-animation,Flutter,Dart,Flutter Layout,Flutter Animation,当容器的高度大于图像但覆盖范围不同时,图像应覆盖。在滑动条上使用boxfill封盖不会改变图像尺寸 SliverAppBar( title: Text('SliverAppBar'), backgroundColor: Colors.green, expandedHeight: MediaQuery.of(context).size.height, flexibleSpace: FlexibleSpaceBar( backgroun

当容器的高度大于图像但覆盖范围不同时,图像应覆盖。在滑动条上使用boxfill封盖不会改变图像尺寸

SliverAppBar(
      title: Text('SliverAppBar'),
      backgroundColor: Colors.green,
      expandedHeight: MediaQuery.of(context).size.height,
      flexibleSpace: FlexibleSpaceBar(
        background:
            Image.asset('assets/caesar-salad.png', fit: BoxFit.cover),
      ),
    ),
下面的图像是我希望实现的过渡,但是使用上面的代码,图像尺寸保持不变,并且不调整大小

由解决

 flexibleSpace: Container(
        decoration: BoxDecoration(
          image: DecorationImage(
              image: ExactAssetImage('assets/caesar-salad.png'),
              fit: BoxFit.cover),
        ),
      ),