docs: update the readme
* Add references to the new undo feature * Use images from the repository itself * Adjust some typos
This commit is contained in:
parent
b5bb8f5c9a
commit
3abd2b059d
32
README.md
32
README.md
|
|
@ -14,26 +14,25 @@ Very smooth animations supporting Android, iOS, Web & Desktop.
|
||||||
|
|
||||||
## Why?
|
## Why?
|
||||||
|
|
||||||
We build this package because we wanted to:
|
We built this package because we wanted to:
|
||||||
|
|
||||||
- have a completely customizable slider
|
- Have a fully customizable slider
|
||||||
- be able to swipe in every direction
|
- Swipe in any direction
|
||||||
- choose our own settings for the swiper such as duration, angle, padding, and more
|
- Undo swipes as many times as you want
|
||||||
- trigger slide to any direction you want using the controller
|
- Choose your own settings such as duration, angle, padding and more
|
||||||
- add callbacks while wiping, on end or when the swiper is disabled
|
- Trigger swipes in any direction with the controller
|
||||||
- detect the direction (left, right, top, bottom) in which the card was swiped away
|
- Add callbacks while swiping, on end, or when the swiper is disabled
|
||||||
|
- Detect the direction (left, right, top, bottom) the card was swiped
|
||||||
|
|
||||||
## Show Cases
|
## Show Cases
|
||||||
|
|
||||||
<img src="https://github.com/appinioGmbH/flutter_packages/blob/main/assets/swiper/swiping.gif?raw=true" height="250" /> <img src="https://github.com/appinioGmbH/flutter_packages/blob/main/assets/swiper/swipe_left_right.gif?raw=true" height="250" />
|
| Swipe in any direction | Trigger swipes | Unswipe the cards |
|
||||||
|
| ---------------------- | :------------- | :---------------- |
|
||||||
|
| <img src="https://github.com/ricardodalarme/flutter_card_swiper/blob/main/images/swiping.gif?raw=true" height="275" /> | <img src="https://github.com/ricardodalarme/flutter_card_swiper/blob/main/images/swipe_left_right.gif?raw=true" height="275" /> | <img src="https://github.com/ricardodalarme/flutter_card_swiper/blob/main/images/unswipe.gif?raw=true" height="275" /> |
|
||||||
|
|
||||||
Customize the angle
|
| Fully customizable |
|
||||||
|
| ------------------ |
|
||||||
<img src="https://github.com/appinioGmbH/flutter_packages/blob/main/assets/swiper/angle.gif?raw=true" height="250" />
|
| <img src="https://github.com/ricardodalarme/flutter_card_swiper/blob/main/images/angle.gif?raw=true" height="275" /> <img src="https://github.com/ricardodalarme/flutter_card_swiper/blob/main/images/treshold.gif?raw=true" height="275" /> |
|
||||||
|
|
||||||
Customize the threshold (when the card should slide away)
|
|
||||||
|
|
||||||
<img src="https://github.com/appinioGmbH/flutter_packages/blob/main/assets/swiper/treshold.gif?raw=true" height="250" />
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|
@ -123,12 +122,13 @@ class Example extends StatelessWidget {
|
||||||
The `Controller` is used to swipe the card from outside of the widget. You can create a controller called `CardSwiperController` and save the instance for further usage. Please have a closer look at our Example for the usage.
|
The `Controller` is used to swipe the card from outside of the widget. You can create a controller called `CardSwiperController` and save the instance for further usage. Please have a closer look at our Example for the usage.
|
||||||
|
|
||||||
| Method | Description |
|
| Method | Description |
|
||||||
| ----------- | :------------------------------------------------------------------------------------------- |
|
| ----------- | :----------------------------------------------------------------------------------------------- |
|
||||||
| swipe | Changes the state of the controller to swipe and swipes the card in your selected direction. |
|
| swipe | Changes the state of the controller to swipe and swipes the card in your selected direction. |
|
||||||
| swipeLeft | Changes the state of the controller to swipe left and swipes the card to the left side. |
|
| swipeLeft | Changes the state of the controller to swipe left and swipes the card to the left side. |
|
||||||
| swipeRight | Changes the state of the controller to swipe right and swipes the card to the right side. |
|
| swipeRight | Changes the state of the controller to swipe right and swipes the card to the right side. |
|
||||||
| swipeTop | Changes the state of the controller to swipe top and swipes the card to the top side. |
|
| swipeTop | Changes the state of the controller to swipe top and swipes the card to the top side. |
|
||||||
| swipeBottom | Changes the state of the controller to swipe bottom and swipes the card to the bottom side. |
|
| swipeBottom | Changes the state of the controller to swipe bottom and swipes the card to the bottom side. |
|
||||||
|
| undo | Changes the state of the controller to undo and brings back the last card that was swiped away. |
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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
|
homepage: https://github.com/ricardodalarme/flutter_card_swiper
|
||||||
issue_tracker: https://github.com/ricardodalarme/flutter_card_swiper/issues
|
issue_tracker: https://github.com/ricardodalarme/flutter_card_swiper/issues
|
||||||
version: 4.1.0
|
version: 4.1.0+1
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.12.0 <3.0.0"
|
sdk: ">=2.12.0 <3.0.0"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue