Support full-screen cards#65
Conversation
Alignment does not work when card is full-screen.
|
|
||
| if (widget.swipeCompleteCallback != null) { | ||
| widget.swipeCompleteCallback(orientation, index); | ||
| widget.swipeCompleteCallback(orientation); |
There was a problem hiding this comment.
Any Reason why we are not sending the current card Index being swiped in the call back?
There was a problem hiding this comment.
yes, because index = 0 is now the front card. You don't need to track _currentFront - the code becomes a lot simpler.
There was a problem hiding this comment.
but on the client-side how do we track which card was swiped?
There was a problem hiding this comment.
So how do we handle a case e.g ,
I have a set of 5 cards and I would like to show some text associated with each card.
so basically there will be a
List<String> ['A','B','C','D','E'];
so in order to show a appropriate text with each card we will need the index of the card being swiped.
Let me know If I am wrong or missing anything :)
There was a problem hiding this comment.
I could have left the index argument in, but it would be 0 every single time.
There was a problem hiding this comment.
So is it like if I have List mapped to cards.on each swipe complete callback I should remove the first element of this list.
And then the first element of the resulting list will be associated with the current card?
There was a problem hiding this comment.
yes, the top/first card gets special treatment - it's the only one that can be swiped, and then it's removed from the list
|
Do we know if this will get reviewed and closed? |
|
cc: @ShaunRain |
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:
Transformis used to translate and scale the card instead ofAlignandSizedBoxSizedBoxmeans that text on the card is resized instead of moved to different lines when the card size animates.