Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Play/Pause icon does not change according to the controller #1

Open
Rulius opened this issue Feb 3, 2023 · 1 comment
Open

Play/Pause icon does not change according to the controller #1

Rulius opened this issue Feb 3, 2023 · 1 comment

Comments

@Rulius
Copy link

Rulius commented Feb 3, 2023

First of all, thanks for share this application and explain how it works. I'm new in flutter, Is is being very interesting to build my first application.
I found a little problem with the icon Play and Pause. When you paused the crono, the icon should show Play, but it continues showing paused. The onPressed sentences, only applies to the controller and not about the Icon?, do you know way to solve this?
Thanks!!

@Rulius
Copy link
Author

Rulius commented Feb 13, 2023

Adding the setState works well:

onPressed: () {
setState(() {
if (controladorppal.isAnimating) {
controladorppal.stop();
} else {
controladorppal.reverse(
from: controladorppal.value == 0.0 ? 1.0 : controladorppal.value);
}
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant