Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@override
void initState() {
super.initState();
_controller = AnimationController(
vsync: this,
duration: const Duration(seconds: 5),
);
profileTopAnimation = Tween<double>(begin: -200.0, end: 0.0).animate(
CurvedAnimation(
parent: _controller,
curve: const Interval(0.0, 0.125, curve: Curves.easeOut),
),
);
textOpacityAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(
CurvedAnimation(
parent: _controller,
curve: const Interval(0.125, 0.250, curve: Curves.easeIn),
),
);
profileMenuAnimation = Tween<double>(begin: -500.0, end: 0.0).animate(
CurvedAnimation(
parent: _controller,
curve:
const Interval(0.250, 0.375, curve: Curves.fastLinearToSlowEaseIn),
),
);
signOutBtnAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(
CurvedAnimation(
parent: _controller,
curve: const Interval(0.375, 0.500, curve: Curves.elasticOut),
),
);
_controller.addListener(() {
setState(() {});
});
_controller.forward();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment