Skip to content

Instantly share code, notes, and snippets.

@red-star25
Created October 5, 2021 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save red-star25/14a2c6ec1c4bba51c9d18b6bb932f86a to your computer and use it in GitHub Desktop.
Save red-star25/14a2c6ec1c4bba51c9d18b6bb932f86a to your computer and use it in GitHub Desktop.
@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