-
Notifications
You must be signed in to change notification settings - Fork 4
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
Implementing onTap event #1
Comments
You were trying to implement If that's the case it has a simple solution and another with more odds to have more actions rather than only You're right, wrapping a face into a
|
Hi. Thanks for replay! I followed your patterns and added /// The callback that triggers when the cubix is moving ///Returns the [SelectedSide] tapped. then in build And struggled to create _onTap function that would return correct SelectedSide enum. I also tried to remove that GestureDetector and add one to each face, but that didn't work either. I am using your widget as view cube, to display how my graphics are orientated, working fine, just wanted to add onTap functionality that will rotate graphics to that side tapped on CubixD. |
I see. My last comment doesn't help at all. The problem here is: In order to move the cube there is a transparent container just in front the cube, so if you tab any face of it, you're actually tapping the transparent container (lib/src/widgets/cubixd.widget.dart lines 183-190) That's the best way i found to move it, because if I move the Adding Using a ...
top: GestureDetector(
onTap: () => print(":p")
child: Container(
...
)
)
... Doesn't work, the Given this situation I think the same, meaby some math is needed in order to get the position and get the I'll give it a try later :'u |
I was trying to implement onTap callback but with no luck. If wrapping child with GestureDetector, it's not working. Would be awesome if could have onTap callback that returns SelectedSide when either of sides are tapped.
The text was updated successfully, but these errors were encountered: