问题描述
PopupMenuItem(
value: 1,height: 90.w,child: InkWell(
onTap: () {
setState(() {
status = "Online";
});
Navigator.pop(context);
},child: Container(
margin: EdgeInsets.only(top: 3,bottom: 3,left: 3,right: 3),child: Row(
children: <Widget>[
Image.asset("images/online_list.png",width: 25.w,height: 25.w),Padding(
padding: EdgeInsets.only(left: 20.w),child: CustomText('Online',MyApp.subDetailTextSize,FontWeight.w500,MyApp.blackText,'Lato'),),],
这是我的代码,当我单击该项目时,它也显示行内和行外的波纹效果,即同时显示2个波纹效果。我要删除行周围的内部。
我尝试移除容器及其边缘,但这种方法也不起作用。
解决方法
您可以在highlightColor
内添加splashColor
和InkWell
属性,例如:
PopUpMenuItem(
child: InkWell(
highlightColor: Colors.transparent,splashColor: Colors.transparent,onTap: (){
// Do your stuffs
},child: // Your child widget
),),
您可以看到InkWell
,here的所有属性。