Created
July 14, 2018 20:18
-
-
Save salihgueler/14390c12843787e304c396d4d889ac51 to your computer and use it in GitHub Desktop.
Masking/Transition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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