小白学Flutter - textButton样式
2023-11-23 本文已影响0人
林希品
TextButton(
style: ButtonStyle(
//背景颜色
backgroundColor: MaterialStateProperty.all(Colors.white),
//文字颜色
foregroundColor:MaterialStateProperty.all(MColors.colorAPP),
//设置圆角
shape: MaterialStateProperty.all(RoundedRectangleBorder(
borderRadius: BorderRadius.circular(22),
),
//边框的宽度 和 颜色
side: MaterialStateProperty.all(
BorderSide(width: 1, color: MColors.colorAPP),
),
)
),
onPressed: () {},
child: Text("足球"),
),