Skip to content

Instantly share code, notes, and snippets.

@ibhavikmakwana
Created May 28, 2018 06:42
Show Gist options
  • Save ibhavikmakwana/3517f530a0be9acaf447b97559215282 to your computer and use it in GitHub Desktop.
Save ibhavikmakwana/3517f530a0be9acaf447b97559215282 to your computer and use it in GitHub Desktop.
AnimatedSize
new AnimatedSize(
curve: Curves.bounceInOut,
child: new GestureDetector(
onTap: () {
setState(() {
if (_resized) {
_resized = false;
_color = Colors.blue;
_height = 80.0;
_width = 80.0;
} else {
_resized = true;
_color = Colors.blue;
_height = 320.0;
_width = 320.0;
}
});
},
child: new Container(
width: _width,
height: _height,
color: _color,
),
),
vsync: this,
duration: new Duration(seconds: 1),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment