Created
June 27, 2019 10:34
-
-
Save flutter-devs/43b76678d571495574a857b834bc8e7c to your computer and use it in GitHub Desktop.
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
Widget firstChild() { | |
return Row( | |
mainAxisAlignment: MainAxisAlignment.spaceAround, | |
children: <Widget>[ | |
AnimatedBuilder( | |
animation: _arrowAnimationController, | |
builder: (context, child) => Transform.rotate( | |
angle: _arrowAnimation.value, | |
child: Icon( | |
Icons.expand_more, | |
size: 50.0, | |
color: Colors.black, | |
), | |
), | |
), | |
OutlineButton( | |
color: Colors.white, | |
textColor: Colors.black, | |
padding: const EdgeInsets.all(12.0), | |
child: Text('Start Icon Animation'), | |
onPressed: () { | |
_arrowAnimationController.isCompleted | |
? _arrowAnimationController.reverse() | |
: _arrowAnimationController.forward(); | |
}, | |
splashColor: Colors.red, | |
) | |
], | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment