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

SettingsTile.switchTile only works for swipe #19

Closed
Swepilot opened this issue May 28, 2020 · 6 comments
Closed

SettingsTile.switchTile only works for swipe #19

Swepilot opened this issue May 28, 2020 · 6 comments

Comments

@Swepilot
Copy link

Looking to implement this package in my project and it looks promising. Good work!

For some reason though the SettingsTile.switchTile switch only works if I swipe it, just tapping it does not toggle the switch.

This is on iOS, have not tried Android behavior.

@Akora-IngDKB
Copy link
Contributor

It works fine for Android.
I think this behaviour is with iOS and Web only.

@Swepilot
Copy link
Author

Please consider this for future release as "tap" is normally working on iOS.

@Akora-IngDKB
Copy link
Contributor

Okay.
I'll look into it for a fix 👍

@Akora-IngDKB
Copy link
Contributor

I've proposed a fix in commit of my open pull request.

@Swepilot
Copy link
Author

Swepilot commented May 28, 2020

I have not looked at the proposed fix but with the existing version I looked in more detail and could see that the onTap was indeed called but only once and the true/false changes but with no change to the position of the switch.

EDIT: If tapping a second time onTap is called but the true/false does not change.

The good news is that I managed to get it all to work if the onTap included a setState()

@yadaniyil
Copy link
Contributor

I checked and seems like a tap on the switch works fine. @Swepilot I'll appreciate a more detailed issue description. Feel free to reopen the issue.

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

3 participants