flutter 去除listview 滑动波纹

自定义一个 ScrollBehavior

方法:

ScrollConfiguration(
       behavior: MyBehavior(),
        child: ListView(),
      );
class MyBehavior  extends ScrollBehavior{
 @override
 Widget buildViewportChrome(BuildContext context, Widget child, AxisDirection axisDirection) {
    if(Platform.isAndroid||Platform.isFuchsia){
     return child;
  }else{
    return super.buildViewportChrome(context,child,axisDirection);
    }
 }
}

推荐阅读更多精彩内容