docs(readme): simplify the constructor description

This commit is contained in:
Ricardo Dalarme 2023-04-18 00:25:58 -03:00 committed by GitHub
parent 589718c4b4
commit 76b24c21db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 21 deletions

View File

@ -97,26 +97,26 @@ class Example extends StatelessWidget {
#### Basic #### Basic
| Parameter | Default | Description | Required | | Parameter | Default | Description | Required |
| -------------------------- | :------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | | -------------------------- | :------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: |
| cardBuilder | - | Widget builder for rendering cards | true | | cardBuilder | - | Widget builder for rendering cards | true |
| cardsCount | - | Number of cards | true | | cardsCount | - | Number of cards | true |
| initialIndex | 0 | Index of the first card when the swiper is initialized | false | | controller | - | Controller to trigger swipe actions | false |
| controller | - | Trigger swipe | false | | direction | right | Direction in which the card is swiped away when triggered from the controller | false |
| padding | EdgeInsets.symmetric(horizontal: 20, vertical: 25) | Controller to trigger swipe actions | false |
| duration | 200 milliseconds | The duration that every animation should last | false | | duration | 200 milliseconds | The duration that every animation should last | false |
| maxAngle | 30 | Maximum angle that the card can reach during swiping | false | | initialIndex | 0 | Index of the first card when the swiper is initialized | false |
| threshold | 50 | Threshold from which the card is swiped away | false |
| scale | 0.9 | Scale of the card that is behind the front card | false |
| isDisabled | false | Set to `true` if swiping should be disabled, has no impact when triggered from the outside | false | | isDisabled | false | Set to `true` if swiping should be disabled, has no impact when triggered from the outside | false |
| isHorizontalSwipingEnabled | true | Set to `false` if you want your card to move only across the vertical axis when swiping | false | | isHorizontalSwipingEnabled | true | Set to `false` if you want your card to move only across the vertical axis when swiping | false |
| isVerticalSwipingEnabled | true | Set to `false` if you want your card to move only across the horizontal axis when swiping | false |
| isLoop | true | Set to `true` if the stack should loop | false | | isLoop | true | Set to `true` if the stack should loop | false |
| onTapDisabled | - | Function that get triggered when the swiper is disabled | false | | isVerticalSwipingEnabled | true | Set to `false` if you want your card to move only across the horizontal axis when swiping | false |
| onSwipe | - | Function that is called when the user swipes a card. If the function returns `false`, the swipe action is canceled. If it returns `true`, the swipe action is performed as expected | false | | maxAngle | 30 | Maximum angle that the card can reach during swiping | false |
| onUndo | - | Function that is called when the controller calls undo. If the function returns `false`, the undo action is canceled. If it returns `true`, the undo action is performed as expected | false | | numberOfCardsDisplayed | 2 | Number of cards displayed at the same time | false |
| onEnd | - | Function that is called when there are no more cards left to swipe | false | | onEnd | - | Callback when there are no more cards left to swipe | false |
| direction | right | Direction in which the card is swiped away when triggered from the outside | false | | onSwipe | - | Callback when the user swipes a card. If the function returns `false`, the swipe action is canceled. If it returns `true`, the swipe action is performed as expected | false |
| numberOfCardsDisplayed | 2 | Number of cards to display at a time | false | | onTapDisabled | - | Callback when a card is tapped and `isDisabled` is `true` | false |
| onUndo | - | Callback when the controller calls undo. If the function returns `false`, the undo action is canceled. If it returns `true`, the undo action is performed as expected | false |
| padding | EdgeInsets.symmetric(horizontal: 20, vertical: 25) | The padding around the swiper | false |
| scale | 0.9 | Scale of the card that is behind the front card | false |
| threshold | 50 | Threshold from which the card is swiped away | false |
#### Controller #### Controller