Flutter TextButton设置圆角、边框

TextButton(
    style: ButtonStyle(
        //圆角
        shape: MaterialStateProperty.all(
            RoundedRectangleBorder(
                borderRadius:
                    BorderRadius.circular(
                        18.67))),
        //边框
        side: MaterialStateProperty.all(
          BorderSide(
              color: Colors.red,
              width: 0.67),
        ),
        //背景
        backgroundColor:
            MaterialStateProperty.all(
                Colors.transparent)),
    child: Text(
      '确定',
      style: TextStyle(
          fontWeight: FontWeight.bold,
          color: Colors.white,
          fontSize: 14),
    ),
    onPressed: () {}
)

你可能感兴趣的:(Flutter,dart)