Fix - text on MaterialButton not changing (#324)

pull/336/head
Harun Madanoglu 6 years ago committed by GitHub
parent ede7c584c1
commit f98d66d514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -52,9 +52,13 @@ class _CustomTweenDemoState extends State<CustomTweenDemo>
textColor: Colors.white,
onPressed: () {
if (controller.status == AnimationStatus.completed) {
controller.reverse();
controller.reverse().whenComplete(() {
setState(() {});
});
} else {
controller.forward();
controller.forward().whenComplete(() {
setState(() {});
});
}
},
),

Loading…
Cancel
Save