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

Pressable freezes on press when onPressed: null #59

Closed
VladimirCores opened this issue Mar 16, 2022 · 3 comments · Fixed by #63
Closed

Pressable freezes on press when onPressed: null #59

VladimirCores opened this issue Mar 16, 2022 · 3 comments · Fixed by #63

Comments

@VladimirCores
Copy link

VladimirCores commented Mar 16, 2022

Face a problem with Pressable - when click/press on the button with onPressed: null it freezes within press state.

Mix (mix different colors):

  final mixButton = Mix(
    p(4),
    rounded(4),
    (hover)(
      bgColor(Colors.red.withOpacity(0.1))
    ),
    (press)(
      bgColor(Colors.red.lighten())
    ),
  );

image

@VladimirCores VladimirCores changed the title Pressable freeze on press when onPressed: null Pressable freezes on press when onPressed: null Mar 16, 2022
@bdlukaa
Copy link
Contributor

bdlukaa commented Mar 16, 2022

When onPressed is null, Pressable assumes it is in its disabled state. To enable it, provide onPressed

@VladimirCores
Copy link
Author

@bdlukaa alright, have you tried to Pressable widget which has onPressed: null and mix I posted in the description? It will freeze in press state.

@bdlukaa
Copy link
Contributor

bdlukaa commented Mar 18, 2022

Yes! I am able to reproduce it

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

Successfully merging a pull request may close this issue.

2 participants