Skip to content

Instantly share code, notes, and snippets.

@salihgueler
Created July 14, 2018 20:18
Show Gist options
  • Save salihgueler/14390c12843787e304c396d4d889ac51 to your computer and use it in GitHub Desktop.
Save salihgueler/14390c12843787e304c396d4d889ac51 to your computer and use it in GitHub Desktop.
Masking/Transition
@override
void initState() {
super.initState();
_controller = AnimationController(
duration: const Duration(seconds: 2), vsync: this)
..addStatusListener((status) {
if (status == AnimationStatus.completed) {
Navigator.pop(context);
}
});
transitionTween = Tween<double>(
begin: 50.0,
end: 200.0,
).animate(
CurvedAnimation(
parent: _controller,
curve: Curves.ease,
),
);
borderRadius = BorderRadiusTween(
begin: BorderRadius.circular(75.0),
end: BorderRadius.circular(0.0),
).animate(
CurvedAnimation(
parent: _controller,
curve: Curves.ease,
),
);
_controller.forward();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment