Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-05-10 13:12:54 +08:00
parent cedbac88c1
commit 664a039617
81 changed files with 771 additions and 217950 deletions

View File

@@ -548,7 +548,6 @@ class RefreshIndicatorState extends State<RefreshIndicator>
}
return ScrollConfiguration(
behavior: RefreshScrollBehavior(
desktopDragDevices,
scrollPhysics: RefreshScrollPhysics(
parent: const RangeMaintainingScrollPhysics(),
onDrag: _onDrag,
@@ -611,8 +610,7 @@ class RefreshIndicatorState extends State<RefreshIndicator>
typedef refreshIndicator = RefreshIndicator;
class RefreshScrollBehavior extends CustomScrollBehavior {
const RefreshScrollBehavior(
super.dragDevices, {
const RefreshScrollBehavior({
required this.scrollPhysics,
});

View File

@@ -2,7 +2,7 @@ import 'package:flutter/gestures.dart' show PointerDeviceKind;
import 'package:flutter/material.dart';
class CustomScrollBehavior extends MaterialScrollBehavior {
const CustomScrollBehavior(this.dragDevices);
const CustomScrollBehavior();
@override
Widget buildScrollbar(
@@ -12,7 +12,14 @@ class CustomScrollBehavior extends MaterialScrollBehavior {
) => child;
@override
final Set<PointerDeviceKind> dragDevices;
Widget buildOverscrollIndicator(
BuildContext context,
Widget child,
ScrollableDetails details,
) => child;
@override
Set<PointerDeviceKind> get dragDevices => desktopDragDevices;
}
const Set<PointerDeviceKind> desktopDragDevices = <PointerDeviceKind>{