Flutter使用InkWell无水波纹效果
2021-03-29 本文已影响0人
习惯了_就好
在InkWell的外层再套上Matetial 以及 Ink组件
Material(
child: Ink(
child:
InkWell(
onTap: () { },
child: Container(
height: 50.0,
color: Colors.white,
child: Text( "点击",
maxLines: 1,
style: TextStyle(color: color),
overflow: TextOverflow.ellipsis,
),
),
),
),
)