appinioGmbH / flutter_packages

Dart and Flutter plugins/packages used and maintained by @appinioGmbH
187 stars 214 forks source link

Dynamic Card Scaling and Opacity Adjustment Based on Drag Position #177

Closed martin1119 closed 10 months ago

martin1119 commented 10 months ago

I would like to make the card that I'm dragging smaller; for example, scaling it from 1 to 0.8 depending on how far behind the card is. The same applies to the overlay opacity on the cards behind. I'd like the card in the back to have a black overlay with an opacity of 0.5, and while dragging, the opacity will decrease toward 0. This could probably be achieved with a single event emitter that informs us of the finger's dragging position. Essentially, the same functionality is already utilized with _backgroundCardsDifference, which decreases incrementally based on the drag position.

I believe that this type of event emitter could be very useful in various scenarios.

bilalhamud commented 10 months ago

Fixed with version 2.1.0