去除完水波纹之后,hover状态都没有了,纯纯的一个按钮,点击、触摸等状态都没有了。上代码 。
style: ButtonStyle(
overlayColor:MaterialStateProperty.resolveWith((states) {
return Colors.transparent;
})),
child: Text(
item.toString(),
style: const TextStyle(
color: Colors.black),
),
onPressed: () {
controller.currentTab = item;
},
),
overlayColor:MaterialStateProperty.resolveWith((states) { return Colors.transparent; })), 这个是主要代码。。会用就行