docs: bump the version in pubspec.yaml, update the docs in README.md and CHANGELOG.md

This commit is contained in:
jawwadhassan 2023-05-11 18:08:18 +05:00
parent fe77440a35
commit 8b68e62f21
6 changed files with 33 additions and 26 deletions

View File

@ -1,3 +1,9 @@
## [5.1.0]
- Adds AllowedSwipeDirection to allow card to be swiped in any combination of left, right, up or down directions.
- **DEPRECATION**:
- `isHorizontalSwipingEnabled` and `isVerticalSwipingEnabled` have been deprecated. Use `allowedSwipeDirection` instead.
## [5.0.1]
- Adds support for negative back card offset.
@ -75,7 +81,7 @@
## [1.1.1]
- Dipose the CardSwiperController to avoid memory leaks
- Dispose the CardSwiperController to avoid memory leaks
## [1.1.0]

View File

@ -96,27 +96,28 @@ class Example extends StatelessWidget {
#### Basic
| Parameter | Default | Description | Required |
| -------------------------- | :------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: |
| cardBuilder | - | Widget builder for rendering cards | true |
| cardsCount | - | Number of cards | true |
| controller | - | Controller to trigger swipe actions | false |
| direction | right | Direction in which the card is swiped away when triggered from the controller | false |
| duration | 200 milliseconds | The duration that every animation should last | false |
| initialIndex | 0 | Index of the first card when the swiper is initialized | 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 |
| isLoop | true | Set to `true` if the stack should loop | false |
| isVerticalSwipingEnabled | true | Set to `false` if you want your card to move only across the horizontal axis when swiping | false |
| maxAngle | 30 | Maximum angle that the card can reach during swiping | false |
| numberOfCardsDisplayed | 2 | Number of cards displayed at the same time | false |
| onEnd | - | Callback when there are no more cards left to swipe | 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 |
| 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 |
| Parameter | Default | Description | Required |
|-------------------------------------------| :------------------------------------------------- |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------| :------: |
| cardBuilder | - | Widget builder for rendering cards | true |
| cardsCount | - | Number of cards | true |
| controller | - | Controller to trigger swipe actions | false |
| direction | right | Direction in which the card is swiped away when triggered from the controller | false |
| duration | 200 milliseconds | The duration that every animation should last | false |
| initialIndex | 0 | Index of the first card when the swiper is initialized | false |
| isDisabled | false | Set to `true` if swiping should be disabled, has no impact when triggered from the outside | false |
| isHorizontalSwipingEnabled _(deprecated)_ | true | Set to `false` if you want your card to move only across the vertical axis when swiping. _(Deprecated: use allowedSwipeDirection instead)_ | false |
| isLoop | true | Set to `true` if the stack should loop | false |
| isVerticalSwipingEnabled _(deprecated)_ | true | Set to `false` if you want your card to move only across the horizontal axis when swiping. _(Deprecated: use allowedSwipeDirection instead)_ | false |
| maxAngle | 30 | Maximum angle that the card can reach during swiping | false |
| allowedSwipeDirection | AllowedSwipeDirection.all | Sets the direction in which the card can be swiped. It can be set to any combination of left, right up or down. | false |
| numberOfCardsDisplayed | 2 | Number of cards displayed at the same time | false |
| onEnd | - | Callback when there are no more cards left to swipe | 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 |
| 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

View File

@ -3,7 +3,7 @@
/// animations supporting Android, iOS, Web & Desktop.
library flutter_card_swiper;
export 'package:flutter_card_swiper/src/card_swipe_direction.dart';
export 'package:flutter_card_swiper/src/allowed_swipe_direction.dart';
export 'package:flutter_card_swiper/src/card_swiper.dart';
export 'package:flutter_card_swiper/src/card_swiper_controller.dart';
export 'package:flutter_card_swiper/src/enums.dart';

View File

@ -48,7 +48,7 @@ class AllowedSwipeDirection {
right: right,
);
/// Allow the card to be swiped in symmetrically in horizontal or vertical directions
/// Allow the card to be swiped symmetrically in horizontal or vertical directions
factory AllowedSwipeDirection.symmetric({
horizontal = false,
vertical = false,

View File

@ -3,7 +3,7 @@ import 'dart:math' as math;
import 'package:flutter/widgets.dart';
import 'package:flutter_card_swiper/src/card_animation.dart';
import 'package:flutter_card_swiper/src/card_swipe_direction.dart';
import 'package:flutter_card_swiper/src/allowed_swipe_direction.dart';
import 'package:flutter_card_swiper/src/card_swiper_controller.dart';
import 'package:flutter_card_swiper/src/enums.dart';
import 'package:flutter_card_swiper/src/extensions.dart';

View File

@ -2,7 +2,7 @@ name: flutter_card_swiper
description: This is a Tinder-like card swiper package. It allows you to swipe left, right, up, and down and define your own business logic for each direction.
homepage: https://github.com/ricardodalarme/flutter_card_swiper
issue_tracker: https://github.com/ricardodalarme/flutter_card_swiper/issues
version: 5.0.1
version: 5.1.0
environment:
sdk: ">=2.12.0 <3.0.0"