hanshengchiu / reorderables

Reorderable table, row, column, wrap, and sliver list that allow drag and drop of the children. https://pub.dartlang.org/packages/reorderables
MIT License
740 stars 170 forks source link

dragging elevation #163

Closed bugrevealingbme closed 2 years ago

bugrevealingbme commented 2 years ago

I want to disable dragging elevation. I can't see any choices. Any method?

taxbwithu commented 2 years ago

You have a property called "buildDraggableFeedback" which looks like this, so you just need to remove elevation here:

Widget defaultBuildDraggableFeedback(
      BuildContext context, BoxConstraints constraints, Widget child) {
    return Transform(
      transform: Matrix4.rotationZ(0),
      alignment: FractionalOffset.topLeft,
      child: Material(
        child:
            Card(child: ConstrainedBox(constraints: constraints, child: child)),
        elevation: 6.0,
        color: Colors.transparent,
        borderRadius: BorderRadius.zero,
      ),
    );
  }
bugrevealingbme commented 2 years ago

Thanks. I removed Card widget and everythins is perfect