flutter 控件加一个边框,还是渐变的

最外层用一个渐变的背景,然后用padding: const EdgeInsets.all(1)就可以了

Container(
                        padding: const EdgeInsets.all(1),
                        decoration: BoxDecorationUtil()
                            .setColumnGradientBoxDecoration(
                            const Color(0x7F01FFF8),
                            CommonColors.getColor1E1F25,
                            0.0,
                            topLeft: 20.0,
                            topRight: 20.0),
                            child: Container())

猜你喜欢

转载自blog.csdn.net/weixin_44911775/article/details/130032574
今日推荐