Created
May 28, 2018 06:42
-
-
Save ibhavikmakwana/3517f530a0be9acaf447b97559215282 to your computer and use it in GitHub Desktop.
AnimatedSize
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
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