Skip to content

Commit f98d66d

Browse files
authored
Fix - text on MaterialButton not changing (#324)
1 parent ede7c58 commit f98d66d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

animations/lib/src/basics/06_custom_tween.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,13 @@ class _CustomTweenDemoState extends State<CustomTweenDemo>
5252
textColor: Colors.white,
5353
onPressed: () {
5454
if (controller.status == AnimationStatus.completed) {
55-
controller.reverse();
55+
controller.reverse().whenComplete(() {
56+
setState(() {});
57+
});
5658
} else {
57-
controller.forward();
59+
controller.forward().whenComplete(() {
60+
setState(() {});
61+
});
5862
}
5963
},
6064
),

0 commit comments

Comments
 (0)