knopp / flutter_reorderable_list

ReorderableList for Flutter
BSD 3-Clause "New" or "Revised" License
335 stars 98 forks source link

VerticalPointerState class fails with #22

Open seachellemz opened 3 years ago

seachellemz commented 3 years ago

I believe this component broke with an upgrade to Dart/Flutter. I am running with the following configuration:

Flutter 1.22.0-10.0.pre.380 • channel master • https://github.com/flutter/flutter.git Framework • revision ec40df9576 (3 days ago) • 2020-09-25 21:27:22 -0700 Engine • revision 3a73d073c8 Tools • Dart 2.11.0 (build 2.11.0-161.0.dev)

The constructor for the MultiDragPointerState now requires two parameters. The flutter_reorderable_list component as coded, was/is only passing in one parameter. I was able to ge this to work by simply passing in a PointerDeviceKind of "unknown".

class _VerticalPointerState extends MultiDragPointerState {
  //TEMPORARY FIX
  _VerticalPointerState(Offset initialPosition) : super(initialPosition,PointerDeviceKind.unknown) {
    _resolveTimer = Timer(Duration(milliseconds: 150), () {
      resolve(GestureDisposition.accepted);
      _resolveTimer = null;
    });
  }
renenucci commented 3 years ago

You are right, it worked now, thanks!