import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';

class MyCustomScrollBehavior extends MaterialScrollBehavior{
  @override 
  Set<PointerDeviceKind> get dragDevices=>{
    PointerDeviceKind.touch,
    PointerDeviceKind.mouse
  };
}

使用

 ScrollConfiguration(
        behavior: MyCustomScrollBehavior(),

发表评论

邮箱地址不会被公开。 必填项已用*标注