hidden_drawer_menu icon indicating copy to clipboard operation
hidden_drawer_menu copied to clipboard

Dragg from right

Open SamiraAriaeifar opened this issue 4 years ago • 3 comments

I want to dragg from right when i have typeOpen: TypeOpen.FROM_RIGHT,

SamiraAriaeifar avatar Sep 03 '20 04:09 SamiraAriaeifar

??

SamiraAriaeifar avatar Sep 05 '20 06:09 SamiraAriaeifar

I can confirm this issue, dragging works very well from the left, but it's not working from the right.

proformance avatar Sep 19 '20 08:09 proformance

I can see that the code is already prepared for dragging on the right side as well. The problem is due to

  void _myOnHorizontalDragStart(DragStartDetails detail) {
    if (!widget.isDraggable) return;
    if (detail.localPosition.dx <= WIDTH_GESTURE &&
        !(widget.withPaddingTop && detail.localPosition.dy <= HEIGHT_APPBAR)) {
      this.setState(() {
        dragging = true;
      });
    }
  }

in animated_drawer_content.dart:120

Increasing WIDTH_GESTURE or commenting out the inner if-statement will make dragging work for you on the right side too.

Best regards

proformance avatar Sep 20 '20 18:09 proformance