Skip to content

Commit

Permalink
v1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
iamSahdeep committed Dec 23, 2019
1 parent 5cec680 commit fdf9c3d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 32 deletions.
14 changes: 7 additions & 7 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ class MyApp extends StatelessWidget {
return new MaterialApp(
home: new Scaffold(
body: LiquidSwipe(
pages: pages,
fullTransitionValue: 200,
enableSlideIcon: true,
enableLoop: true,
positionSlideIcon: 0.5,
waveType: WaveType.liquidReveal,
)));
pages: pages,
fullTransitionValue: 200,
enableSlideIcon: true,
enableLoop: true,
positionSlideIcon: 0.5,
waveType: WaveType.liquidReveal,
)));
}

pageChangeCallback(int page) {
Expand Down
24 changes: 10 additions & 14 deletions lib/Animation_Gesture/animated_page_dragger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,23 @@ class AnimatedPageDragger {

//Adding listener to animation controller
//Also value to animation controller vary from 0.0 to 1.0 according to duration.
completionAnimationController = AnimationController(
duration: duration, vsync: vsync)
completionAnimationController =
AnimationController(duration: duration, vsync: vsync)
..addListener(() {
final slidePercent = lerpDouble(
startSlidePercentHor, endSlidePercentHor,
completionAnimationController.value);
final slidePercentVer = lerpDouble(
startSlidePercentVer, endSlidePercentVer,
completionAnimationController.value);
final slidePercent = lerpDouble(startSlidePercentHor,
endSlidePercentHor, completionAnimationController.value);
final slidePercentVer = lerpDouble(startSlidePercentVer,
endSlidePercentVer, completionAnimationController.value);
//Adding to slide update stream
slideUpdateStream.add(
SlideUpdate(slideDirection, slidePercent, slidePercentVer,
UpdateType.animating));
slideUpdateStream.add(SlideUpdate(slideDirection, slidePercent,
slidePercentVer, UpdateType.animating));
})
..addStatusListener((AnimationStatus status) {
//When animation has done executing
if (status == AnimationStatus.completed) {
//Adding to slide update stream
slideUpdateStream.add(SlideUpdate(
slideDirection, slidePercentHor, slidePercentVer,
UpdateType.doneAnimating));
slideUpdateStream.add(SlideUpdate(slideDirection, slidePercentHor,
slidePercentVer, UpdateType.doneAnimating));
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Animation_Gesture/page_dragger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ class _PageDraggerState extends State<PageDragger> {
onVerticalDragUpdate: onDragUpdate,
child: widget.enableSlideIcon
? Align(
alignment: Alignment(1 - slidePercentHor + 0.005,
widget.iconPosition + widget.iconPosition / 10),
alignment: Alignment(1 - slidePercentHor + 0.005,
widget.iconPosition + widget.iconPosition / 10),
child: Opacity(
opacity: 1 - slidePercentHor,
child: FloatingActionButton(
Expand Down
10 changes: 6 additions & 4 deletions lib/Animation_Gesture/page_reveal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class PageReveal extends StatelessWidget {
this.child,
this.slideDirection,
this.iconPosition,
this.waveType, this.vertReveal });
this.waveType,
this.vertReveal});

@override
Widget build(BuildContext context) {
Expand All @@ -39,11 +40,12 @@ class PageReveal extends StatelessWidget {
break;
case WaveType.circularReveal:
return ClipPath(
clipper: CircularWave(iconPosition,
clipper: CircularWave(
iconPosition,
slideDirection == SlideDirection.leftToRight
? 1.0 - revealPercent
: revealPercent, vertReveal),

: revealPercent,
vertReveal),
child: child,
);
break;
Expand Down
5 changes: 1 addition & 4 deletions lib/Constants/Helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@ enum TransitionGoal {
close,
}

enum WaveType {
circularReveal,
liquidReveal
}
enum WaveType { circularReveal, liquidReveal }
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: liquid_swipe
description: A Flutter plugin to implement liquid Swipe effect to provided containers.
version: 1.3.1
author: Sahdeep Singh <[email protected]>
homepage: https://github.com/iamSahdeep/liquid_swipe_flutter

environment:
Expand Down

0 comments on commit fdf9c3d

Please sign in to comment.