📜  颤动卡片背景渐变 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:14.956000             🧑  作者: Mango

代码示例2
Container(
                  width: width / 1.2,
                  height: height / 6,
                  decoration: BoxDecoration(
                    gradient: LinearGradient(
                      colors: [
                        DynamicColor().primarycolor,
                        Color(0xFFFFFFFF),
                      ],
                      begin: const FractionalOffset(0.0, 0.0),
                      end: const FractionalOffset(1.0, 0.0),
                      stops: [0.0, 1.0],
                      tileMode: TileMode.clamp,
                    ),
                  ),
                  child: Card(
                    // color: DynamicColor().primarycolor,
                    elevation: 2,
                    shape: RoundedRectangleBorder(
                      borderRadius: BorderRadius.circular(10.0),
                    ),
                  ),
                ),