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

How to use it as dice? #3

Open
saklanmazozgur opened this issue Jun 7, 2024 · 1 comment
Open

How to use it as dice? #3

saklanmazozgur opened this issue Jun 7, 2024 · 1 comment

Comments

@saklanmazozgur
Copy link

Hello,

First of all, thank you for the package. I want to use this in a dice rolling application. There is a constant up and down animation in Cubixd, I wasn't sure how to turn it off. Also, what is your suggestion for giving a dice roll effect to the existing cube? Actually, I want to make an application similar to the one here.

https://z.flutter.gallery/examples/#/dice

@ElRojo7u7
Copy link
Owner

The AnimatedCubixD widget is actually the CubixD widget wrapped within a AnimatedBuilder, so the cube without animation is actually the CubixD widget

To make a dice roll, with this package, you could use the CubixD widget and wrap it into an AnimatedBuilder, that way you can modify the size (size parameter), and horizontal and vertical positions (delta parameter)
Modifying the size to be smaller will be helpful for you to give the feeling that the cube is falling

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

2 participants