Flutter ButtonStyle设置圆角

ElevatedButton(
    child: Text(
      '提交',
      style: TextStyle(
          fontWeight: FontWeight.bold,
          color: Colors.white[300],
          fontSize: 14),
    ),
    onPressed: () {print("提交");}
    style: ButtonStyle(
        //圆角
        shape: MaterialStateProperty.all(
            RoundedRectangleBorder(
                borderRadius:
                    BorderRadius.circular(
                        20))),
        //边框
        side: MaterialStateProperty.all(
          BorderSide(
              color: Colors.red,
              width: 0.5),
        ),
        //背景
        backgroundColor:
            MaterialStateProperty.all(
                Colors.blue[200])),
)

上一篇:【python】目标检测结果可视化


下一篇:加密强度:128位SSL与256位SSL的区别