mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +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,
|
textColor: Colors.white,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (controller.status == AnimationStatus.completed) {
|
if (controller.status == AnimationStatus.completed) {
|
||||||
controller.reverse();
|
controller.reverse().whenComplete(() {
|
||||||
|
setState(() {});
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
controller.forward();
|
controller.forward().whenComplete(() {
|
||||||
|
setState(() {});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user