Created
June 9, 2020 17:01
-
-
Save SahanAmarsha/87b99f2f89a91f1bc4f0cfb42f39d4e7 to your computer and use it in GitHub Desktop.
Defining the Flip Animation
This file contains hidden or 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
| AnimationController _controller; | |
| Animation _myAnimation; | |
| AnimationStatus _animationStatus = AnimationStatus.dismissed; | |
| @override | |
| void initState() { | |
| super.initState(); | |
| _controller = | |
| AnimationController(vsync: this, duration: Duration(seconds: 1)); | |
| _myAnimation = Tween(end: 1.0, begin: 0.0).animate(_controller) | |
| ..addListener(() { | |
| setState(() {}); | |
| }) | |
| ..addStatusListener((status) { | |
| _animationStatus = status; | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment