flutter_slidable icon indicating copy to clipboard operation
flutter_slidable copied to clipboard

1.3.2 fix has caused dismissal pane to overflow now

Open SamAAdd opened this issue 3 years ago • 2 comments

A fix was recently implemented in 1.3.2 to remove clipBehavior: value == 1 ? Clip.none : Clip.hardEdge

But this has now resulted in the tile overflowing on the left when dragged outside of the ListView it's placed inside - I think we need to use Clip.hardEdge to prevent this.

Is there an issue with just doing this?

final align = Align(
      alignment: alignment,
      heightFactor: axis == Axis.vertical ? value : null,
      widthFactor: axis == Axis.horizontal ? value : null,
      child: child,
    );

    // if (value == 1) {
    //   // We don't want to clip our child in normal conditions.
    //   return align;
    // }

    // We can't use ClipBehavior.none on Flutter versions < 3.
    return ClipRect(
      clipBehavior: Clip.hardEdge, <------ THIS SOLVES THE ISSUE
      child: align,
    );

SamAAdd avatar Jul 28 '22 10:07 SamAAdd

It's been two weeks now - any fix planned?

SamAAdd avatar Aug 11 '22 13:08 SamAAdd

Facing the same issue. Setting Clip.hardEdge fixed it. Thanks!

hm122 avatar Sep 06 '22 16:09 hm122