Skip to content

Commit c090141

Browse files
committed
Bumped version 0.4.8
1 parent 82a9b52 commit c090141

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.8
2+
### Addded
3+
* onSlideAnimationChanged and onSlideIsOpenChanged on `SlidableController`.
4+
15
## 0.4.7
26
### Fixed
37
* https://github.com/letsar/flutter_slidable/issues/31 (Issue with dismiss animation).

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ In the `pubspec.yaml` of your flutter project, add the following dependency:
2727
```yaml
2828
dependencies:
2929
...
30-
flutter_slidable: "^0.4.7"
30+
flutter_slidable: "^0.4.8"
3131
```
3232
3333
In your library add the following import:
@@ -233,7 +233,32 @@ new Slidable(
233233
controller: slidableController,
234234
...
235235
);
236-
```
236+
```
237+
238+
#### How can I animate an external widget at the same time as the active Slidable?
239+
240+
You have to set the callbacks of a `SlidableController` instance:
241+
The `onSlideAnimationChanged` let you get the animation of the current Slidable.
242+
The `onSlideIsOpenChanged` let you know when the current Slidable opens and closes.
243+
244+
```dart
245+
final SlidableController slidableController = new SlidableController(
246+
onSlideAnimationChanged: handleSlideAnimationChanged,
247+
onSlideIsOpenChanged: handleSlideIsOpenChanged,
248+
);
249+
...
250+
void handleSlideAnimationChanged(Animation<double> slideAnimation) {
251+
setState(() {
252+
_rotationAnimation = slideAnimation;
253+
});
254+
}
255+
256+
void handleSlideIsOpenChanged(bool isOpen) {
257+
setState(() {
258+
_fabColor = isOpen ? Colors.green : Colors.blue;
259+
});
260+
}
261+
```
237262

238263
## Changelog
239264

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_slidable
22
description: A Flutter implementation of slidable list item with directional slide actions that can be dismissed.
3-
version: 0.4.7
3+
version: 0.4.8
44
author: Romain Rastel <[email protected]>
55
homepage: https://github.com/letsar/flutter_slidable
66

0 commit comments

Comments
 (0)