From aaa22ed1ccfc79d0dd484ebcb2374cc0033a79d6 Mon Sep 17 00:00:00 2001 From: Stefan Mocken Date: Sun, 27 Jun 2021 22:10:53 +0200 Subject: [PATCH] MultiDragGestureRecognizer patch --- lib/flutter_reorderable_list.dart | 20 +++++++++++--------- pubspec.yaml | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/flutter_reorderable_list.dart b/lib/flutter_reorderable_list.dart index 9059b62..d105c58 100644 --- a/lib/flutter_reorderable_list.dart +++ b/lib/flutter_reorderable_list.dart @@ -129,11 +129,9 @@ class ReorderableListener extends StatelessWidget { @protected MultiDragGestureRecognizer createRecognizer({ required Object? debugOwner, - PointerDeviceKind? kind, }) { return _Recognizer( debugOwner: debugOwner, - kind: kind, ); } @@ -144,10 +142,13 @@ class ReorderableListener extends StatelessWidget { final listState = _ReorderableListState.of(context)!; if (listState.dragging == null) { listState._startDragging( - key: state!.key, - event: event!, - scrollable: scrollable, - recognizer: createRecognizer(debugOwner: this, kind: event.kind)); + key: state!.key, + event: event!, + scrollable: scrollable, + recognizer: createRecognizer( + debugOwner: this, + ), + ); } } } @@ -761,11 +762,12 @@ class _VerticalPointerState extends MultiDragPointerState { // VerticalDragGestureRecognizer waits for kTouchSlop to be reached; We don't want that // when reordering items // -class _Recognizer extends MultiDragGestureRecognizer<_VerticalPointerState> { +class _Recognizer extends MultiDragGestureRecognizer { _Recognizer({ required Object? debugOwner, - PointerDeviceKind? kind, - }) : super(debugOwner: debugOwner, kind: kind); + }) : super( + debugOwner: debugOwner, + ); @override _VerticalPointerState createNewPointerState(PointerDownEvent event) { diff --git a/pubspec.yaml b/pubspec.yaml index cf7cca5..d10d3d8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_reorderable_list description: Reorderable list for flutter. -version: 1.0.0 +version: 1.0.1 homepage: https://github.com/knopp/flutter_reorderable_list environment: