Skip to content

Instantly share code, notes, and snippets.

@flutter-devs
Created June 27, 2019 10:34
Show Gist options
  • Save flutter-devs/43b76678d571495574a857b834bc8e7c to your computer and use it in GitHub Desktop.
Save flutter-devs/43b76678d571495574a857b834bc8e7c to your computer and use it in GitHub Desktop.
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