Created
July 14, 2018 20:19
-
-
Save salihgueler/b3c8697446fb972b1e55e52cc3efe1b4 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 | |
Widget build(BuildContext context) { | |
return AnimatedBuilder( | |
animation: _controller, | |
builder: (BuildContext context, Widget child) { | |
return Scaffold( | |
body: new Center( | |
child: new Stack( | |
children: <Widget>[ | |
new Center( | |
child: Container( | |
width: 200.0, | |
height: 200.0, | |
color: Colors.black12, | |
)), | |
new Center( | |
child: Container( | |
alignment: Alignment.bottomCenter, | |
width: transitionTween.value, | |
height: transitionTween.value, | |
decoration: BoxDecoration( | |
color: Colors.black12, | |
borderRadius: borderRadius.value, | |
), | |
)), | |
], | |
))); | |
}, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment