Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/9.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 卡的颤振边界半径不';t申请儿童:集装箱?_Flutter_Flutter Layout - Fatal编程技术网

Flutter 卡的颤振边界半径不';t申请儿童:集装箱?

Flutter 卡的颤振边界半径不';t申请儿童:集装箱?,flutter,flutter-layout,Flutter,Flutter Layout,我有下面的代码,我想知道如何使容器接受卡?我知道的唯一方法是在容器的盒子装饰中添加BorderRadius,但这是正确的方法吗?我怎样才能做得更好 Align( child: Card( elevation: 10, shape: RoundedRectangleBorder( borderRadius: BorderRadi

我有下面的代码,我想知道如何使容器接受卡?我知道的唯一方法是在容器的盒子装饰中添加BorderRadius,但这是正确的方法吗?我怎样才能做得更好

              Align(
                child: Card(
                  elevation: 10,
                  shape: RoundedRectangleBorder(
                    borderRadius: BorderRadius.circular(20),
                  ),
                  child: Container(
                    width: 200,
                    height: 200,
                    decoration: BoxDecoration(
                      gradient: LinearGradient(
                        colors: [Color(0xff232526),Color(0xff414345) ],
                        begin: Alignment.bottomCenter,
                       // stops: [0.1,1],
                        end: Alignment.topCenter,
                      ),
                    ),
                    child: RadialGauge(
                      counter: snapshot.data['Strom'].toDouble(),
                    ).buildGauge(),
                  ),
                ),
              ),

在您的集装箱箱中,添加以下内容

边界半径:边界半径。圆形(半径),

在您的包装箱中,将此添加到容器的包装箱中

边界半径:边界半径。圆形(半径),

您可以使用Clip.hardEdge,将多余的部分剪掉

Card(
              clipBehavior: Clip.hardEdge,
              elevation: 10,
              shape: RoundedRectangleBorder(
                borderRadius: BorderRadius.circular(20),
              ),
              child:...

您可以使用Clip.hardEdge,将多余的部分剪掉

Card(
              clipBehavior: Clip.hardEdge,
              elevation: 10,
              shape: RoundedRectangleBorder(
                borderRadius: BorderRadius.circular(20),
              ),
              child:...

这样做完全可以。不要使用剪辑,因为这被认为是一个繁重的操作。这样做很好。不要使用剪辑,因为这被认为是一个繁重的操作。