Skip to content

Instantly share code, notes, and snippets.

@salihgueler
Created July 14, 2018 20:19
Show Gist options
  • Save salihgueler/b3c8697446fb972b1e55e52cc3efe1b4 to your computer and use it in GitHub Desktop.
Save salihgueler/b3c8697446fb972b1e55e52cc3efe1b4 to your computer and use it in GitHub Desktop.
Masking/Transition
@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