Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@override
initState() {
final Curve curve = Curves.easeOut;
_animationController =
AnimationController(vsync: this, duration: Duration(milliseconds: 500));
_translateButton = Tween<double>(
begin: _fabHeight,
end: -8.0,
).animate(CurvedAnimation(
parent: _animationController,
curve: Interval(
0.0,
0.75,
curve: curve,
),
));
super.initState();
}
toggleMenu() {
if (!isOpened) {
_animationController.forward();
} else {
_animationController.reverse();
}
setState(() {
isOpened = !isOpened;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.