基础组件库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

26 regels
729 B

  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/material.dart';
  3. class OverScrollBehavior extends ScrollBehavior{
  4. @override
  5. Widget buildViewportChrome(BuildContext context, Widget child, AxisDirection axisDirection) {
  6. switch (getPlatform(context)) {
  7. case TargetPlatform.iOS:
  8. return child;
  9. case TargetPlatform.android:
  10. case TargetPlatform.fuchsia:
  11. return GlowingOverscrollIndicator(
  12. child: child,
  13. //不显示头部水波纹
  14. showLeading: false,
  15. //不显示尾部水波纹
  16. showTrailing: false,
  17. axisDirection: axisDirection,
  18. color: Theme.of(context).accentColor,
  19. );
  20. }
  21. return null;
  22. }
  23. }