dough_sensors 0.0.2 copy "dough_sensors: ^0.0.2" to clipboard
dough_sensors: ^0.0.2 copied to clipboard

Smooshy widgets that use sensors.

Flutter Dough

Awesome: Flutter

Smooshy widgets that use sensors. Builds on top of the Dough library.

How to use #

This package provides sensor-based squishy widgets you can use right out of the box. For a more complete overview on how to use the Dough Sensors library, check out the example project provided on GitHub.

Gyro Dough #

Wrap any widget in GyroDough to make it squish based on how a user moves their phone around in physical space. This widget only works on devices that have accelerometer/gyroscope features.

GyroDough(
  child: Container( ... ),
);

You can find a full example of how to use this widget here.

GyroDough Demo


Customize how the Dough feels #

If you don't like the default dough settings, you can easily change how the dough feels. Just wrap any widget that uses GyroDough in a GyroDoughRecipe and you're good to go.

GyroDoughRecipe(
  data: GyroDoughRecipeData(
    gyroMultiplier: 110, // Control the squishiness of the widget
    ...
  ),
  child: GyroDough( ... ),
);

You can find a full example of how to use this widget here.


Contributing #

Contributions to this package are always welcome! Please read the contributing guidlines.

  • If you have an idea/suggestion/bug-report, feel free to create a ticket.
  • If you created a custom Dough widget or some other awesome feature that you want to share with the community, you can fork the repository and submit a pull request!

keywords: dough, rubber, elastic, rubber-band, rubberband, stretchy, squishy, smooshy, linear-algebra, matrix, transformation, flexible, draggable, drag, pressable, custom, ui, ux, interactive, animation, engage, sensors