Created
June 27, 2019 10:38
-
-
Save flutter-devs/1e3fe5e5b266e7870c688c58dd4d7037 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class AnimatedScreen extends StatefulWidget { | |
@override | |
_AnimatedScreenState createState() => _AnimatedScreenState(); | |
} | |
class _AnimatedScreenState extends State<AnimatedScreen> | |
with TickerProviderStateMixin { | |
Animation _containerRadiusAnimation, | |
_containerSizeAnimation, | |
_containerColorAnimation; | |
AnimationController _containerAnimationController; | |
@override | |
void initState() { | |
super.initState(); | |
_containerAnimationController = AnimationController( | |
vsync: this, duration: Duration(milliseconds: 5000)); | |
_containerRadiusAnimation = BorderRadiusTween( | |
begin: BorderRadius.circular(100.0), | |
end: BorderRadius.circular(0.0)) | |
.animate(CurvedAnimation( | |
curve: Curves.ease, parent: _containerAnimationController)); | |
_containerSizeAnimation = Tween(begin: 0.0, end: 2.0).animate( | |
CurvedAnimation( | |
curve: Curves.ease, parent: _containerAnimationController)); | |
_containerColorAnimation = | |
ColorTween(begin: Colors.black, end: Colors.white).animate( | |
CurvedAnimation( | |
curve: Curves.ease, parent: _containerAnimationController)); | |
_containerAnimationController.forward(); | |
} | |
@override | |
Widget build(BuildContext context) {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment