Skip to content

Instantly share code, notes, and snippets.

@SahanAmarsha
Created June 9, 2020 17:01
Show Gist options
  • Select an option

  • Save SahanAmarsha/87b99f2f89a91f1bc4f0cfb42f39d4e7 to your computer and use it in GitHub Desktop.

Select an option

Save SahanAmarsha/87b99f2f89a91f1bc4f0cfb42f39d4e7 to your computer and use it in GitHub Desktop.
Defining the Flip Animation
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