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:
@@ -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(() {});
|
||||
});
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user