flutter_tindercard
flutter_tindercard copied to clipboard
Support full-screen cards
The main purpose of this PR is to allow cards to be full-screen without the odd behaviour mentioned in #55.
In order to achieve this I've had to make a number of changes:
-
Transform
is used to translate and scale the card instead ofAlign
andSizedBox
- Switching from
SizedBox
means that text on the card is resized instead of moved to different lines when the card size animates. - Cards behind the front card are scaled in perspective, so you can have unlimited cards in your stack without cards at the back suddenly becoming larger
- Instead of specifying a minimum height/width, you can specify a scaling factor.
- card[0] is the front card - it removes a lot of complexity from the code
- the rotation angle depends on whether you started dragging the top or bottom half of the card. The card stays pinned under your finger and the far end drags behind.
Do we know if this will get reviewed and closed?
cc: @ShaunRain