您可以为您的TextButton添加一个shape参数
TextButton(
style: TextButton.styleFrom(
backgroundColor: Colors.yellow,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.zero))),
child: const Text("BUtton"),
onPressed: () {},
)
在你的TextButton()函数中添加这行代码
style: TextButton.styleFrom(
shape: const BeveledRectangleBorder(borderRadius: BorderRadius.zero),
),