From c55edd8d4440d610971bb5f11000015ffc7b54f6 Mon Sep 17 00:00:00 2001 From: Jawwad Hassan Date: Fri, 5 May 2023 10:20:42 +0500 Subject: [PATCH] docs: update dart docs for scale scale and backCardOffset --- lib/src/card_swiper.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/src/card_swiper.dart b/lib/src/card_swiper.dart index 6a075de..0de5f5f 100644 --- a/lib/src/card_swiper.dart +++ b/lib/src/card_swiper.dart @@ -57,6 +57,12 @@ class CardSwiper extends StatefulWidget { /// The scale of the card that is behind the front card. /// + /// The [scale] and [backCardOffset] both impact the positions of the back cards. + /// In order to keep the back card position same after changing the [scale], + /// the [backCardOffset] should also be adjusted. + /// * As a rough rule of thumb, 0.1 change in [scale] effects an + /// [backCardOffset] of ~35px. + /// /// Must be between 0 and 1. Defaults to 0.9. final double scale; @@ -108,6 +114,11 @@ class CardSwiper extends StatefulWidget { /// The offset of the back card from the front card. /// + /// In order to keep the back card position same after changing the [backCardOffset], + /// the [scale] should also be adjusted. + /// * As a rough rule of thumb, 35px change in [backCardOffset] effects a + /// [scale] change of 0.1. + /// /// Must be a positive value. Defaults to Offset(0, 40). final Offset backCardOffset;