Flutter 在桌面端实现横向滚动
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(),