目录
- 正文
正文
ScrollConfiguration( behavior: NoScrollBehaviorWidget(), child: ListView( ...... ...编程客栈... ), ),
- 调用ScrollConfiguration官方类,实现behavior
- NoScrollBehaviorWidget用于去除水波纹的自定义Widget
import 'package:flutter/material.Dart'; /// 去除listview水印 /// ScrollConfiguration behavior class NoScrollBehaviorWidget extends ScrollBehavior { @override Widget buildViewportChrome(BuildContext context, Widget child, AxisDirection axisDirection) { switch (getPlatform(context)) { case TargetPlatform.IOS: return child; case TargetPlatform.android: case TargetPlatform.fuchsia: return GlowingOverscrollIndicator( axisDirectio开发者_C学习n: axisDirection, color: Theme .of(context) .accentColor, child: child, showTrailing: false, showLeading: false,php); case TargetPlatform.linux: break; case TargetPlatform.MACOS: break; case TargpythonetPlatform.Windows: 编程客栈 break; } return child; } }
以上就是Flutter开发技巧ListView去除水python波纹方法示例的详细内容,更多关于Flutter ListView去除水波纹的资料请关注我们其它相关文章!
精彩评论