0
点赞
收藏
分享

微信扫一扫

Flutter ButtonStyle设置圆角

Java架构领域 2022-02-01 阅读 81
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])),
)
举报

相关推荐

0 条评论