dough 0.0.4 copy "dough: ^0.0.4" to clipboard
dough: ^0.0.4 copied to clipboard

outdated

This library provides widgets that can be used to create a smooshy user interface.

dough #

This package provides some widgets you can use to create a smooshy UI.

How to use #

Simply wrap any widget in one of the provided dough widgets like so:

PressableDough(
    onReleased: (details) { },
    child: FloatingActionButton(
        onPressed: () {},
        child: Icon(Icons.fingerprint),
    );
);

That's it. Now your UI is smooshy! It will look something like this:

Alt Text

Customization #

If you don't like the default dough settings, you can easily change how the dough feels. Just wrap your dough in a DoughRecipe widget and you're good to go.

DoughRecipe(
    data: DoughRecipeData(
        adhesion: 8,
        viscosity: 3000,
        ...
    ),
    child: PressableDough( ... ),
);

Future improvements #

Scaling – The expansion property for the dough currently only scales widgets uniformly. Ideally, when you press on the dough widget, the pixels closest to your finger would scale more than the pixels farther away (as you'd expect from pressing something squishy). A possible solution to this would be to use some sort of homography. If you have any ideas for how to achieve this, please consider contributing!

More dough widgets – Currently only the PressableDough widget is provided out of the box. Support for more dough widgets will be added in the future.

403
likes
0
pub points
81%
popularity

Publisher

verified publisherjosiahsaunders.com

This library provides widgets that can be used to create a smooshy user interface.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, vector_math

More

Packages that depend on dough