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])),
)

你可能感兴趣的:(flutter,flutter,css3,css)