Flutter 带图形的颤振文本背景

Flutter 带图形的颤振文本背景,flutter,Flutter,这是我的信用卡密码 上面的代码就是这样执行的 我希望字母的背景不要连接到卡片的末端,而是进入一个带有圆形末端的正方形 希望这对你有帮助 您应该尝试堆栈而不是列它工作Thx:) Card( color: const Color(0xFF202020), child: Column( children: [ ListTile( title: cons

这是我的信用卡密码

上面的代码就是这样执行的

我希望字母的背景不要连接到卡片的末端,而是进入一个带有圆形末端的正方形

希望这对你有帮助


您应该尝试堆栈而不是列它工作Thx:)
Card(
            color: const Color(0xFF202020),
            child: Column(
              children: [
                ListTile(
                    title: const DecoratedBox(
                  decoration:
                      const BoxDecoration(color: const Color(0xFF141414)),
                  child: const Text(
                    'John',
                    style: TextStyle(color: const Color(0xFFE7E7E7)),
                  ),
                )),
                ButtonBar(
                  alignment: MainAxisAlignment.start,
                  children: [
                    FlatButton(
                        textColor: const Color(0xFFE7E7E7),
                        onPressed: () {},
                        child: const Text('Contact'))
                  ],
                )
              ],
            ),
          ),
Center(
        child: Container(
          alignment: Alignment.center,
          margin: const EdgeInsets.all(10),
          height: 65,
          decoration: BoxDecoration(
              color: Color(0xFF202020),
              shape: BoxShape.rectangle,
              borderRadius: BorderRadius.circular(10)),
          child: Text(
            'John',
            textAlign: TextAlign.center,
            style: TextStyle(
              fontWeight: FontWeight.bold,
              fontSize: 22,
              letterSpacing: 0.5,
              color: const Color(0xFFE7E7E7),
            ),
          ),
        ),
      )