Skip to content

Instantly share code, notes, and snippets.

@SahanAmarsha
Last active June 5, 2020 11:20
Show Gist options
  • Save SahanAmarsha/b3ae1b7e1abe772ad0c8bcf06f322d7b to your computer and use it in GitHub Desktop.
Save SahanAmarsha/b3ae1b7e1abe772ad0c8bcf06f322d7b to your computer and use it in GitHub Desktop.
How to define a fade animation in your Flutter app
AnimationController _controller;
Animation _myAnimation;
void initState() {
// TODO: implement initState
super.initState();
_controller = AnimationController(
vsync: this,
duration: Duration(milliseconds: 1200),
);
_myAnimation = CurvedAnimation(parent: _controller, curve: Curves.easeIn);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment