1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Fix - text on MaterialButton not changing (#324)

This commit is contained in:
Harun Madanoglu
2020-02-21 17:38:57 +01:00
committed by GitHub
parent ede7c584c1
commit f98d66d514

View File

@@ -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(() {});
});
}
},
),