Open mono0926 opened 4 years ago
Before this change, transparent area of ReorderableListener doesn't react to onPointerDown.
ReorderableListener
onPointerDown
This can be reproduced by commenting out this line: https://github.com/knopp/flutter_reorderable_list/blob/327f51efd68a8f15f9d87af3053c8e7c4d168669/example/lib/main.dart#L194
And the problem is fixed by specifying behavior: HitTestBehavior.opaque, so that parameter is needed.
behavior: HitTestBehavior.opaque
Widget dragHandle = draggingMode == DraggingMode.iOS ? ReorderableListener( child: Container( padding: EdgeInsets.only(right: 18.0, left: 18.0), // color: Color(0x08000000), child: Center( child: Icon(Icons.reorder, color: Color(0xFF888888)), ), ), // Add this behavior: HitTestBehavior.opaque, ) : Container();
Original code:
https://github.com/knopp/flutter_reorderable_list/blob/327f51efd68a8f15f9d87af3053c8e7c4d168669/example/lib/main.dart#L190-L200
Before this change, transparent area of
ReorderableListener
doesn't react toonPointerDown
.This can be reproduced by commenting out this line: https://github.com/knopp/flutter_reorderable_list/blob/327f51efd68a8f15f9d87af3053c8e7c4d168669/example/lib/main.dart#L194
And the problem is fixed by specifying
behavior: HitTestBehavior.opaque
, so that parameter is needed.Original code:
https://github.com/knopp/flutter_reorderable_list/blob/327f51efd68a8f15f9d87af3053c8e7c4d168669/example/lib/main.dart#L190-L200