Created
July 15, 2019 07:37
-
-
Save flutter-devs/e585ff4ae3f76881345795b25c7cc53c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Animation _circleAnimation; | |
AnimationController _animationController; | |
@override | |
void initState() { | |
super.initState(); | |
_animationController = | |
AnimationController(vsync: this, duration: Duration(milliseconds: 60)); | |
_circleAnimation = AlignmentTween( | |
begin: widget.value ? Alignment.centerRight : Alignment.centerLeft, | |
end: widget.value ? Alignment.centerLeft : Alignment.centerRight) | |
.animate(CurvedAnimation( | |
parent: _animationController, curve: Curves.linear)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment